Sybase ODBC driver - numeric or decimal datatype problem

Hello!
I have Sybase Adaptive Server Enterprise 15.0.2 and Oracle 10.2.0 ("show release" in SQL*plus prints 1002000100) on the same machine (OS = Windows XP, name = Workstation). I wanna load correct information from the table in Sybase via Oracle database link.
Well, I've edited tnsnames.ora, listener.ora. Also I've created initmysybase.ora in hs\admin directory. And, of course, set up DSN (using Sybase ODBC driver) via odbcad32.exe - and named it "mysybase".
Table ("test", user = guest) definition in Sybase is:
column "id" - int, column "data_num" - numeric(10, 5), column "data_dec" - decimal(10, 5). And it's content is: (1, 1.12345, 5.54321). I've set up a database link.
My problem is that whenever I do the SELECT statement (SELECT * FROM "guest.test"@mysybase) I get 0 (zero) for both data_num and data_dec columns.
Status of investigation:
The "describe" command in SQL*plus returns:
id NOT NULL NUMBER(10)
data_num NUMBER(10,5)
data_dec NUMBER(10,5)
UPDATE statement works perfectly.
I've downloaded a trial version of ODBC drivers from www.datadirect.com and all works fine.
So, I believe that maybe there are some bugs in ODBC driver from Sybase, or maybe I should configure smth.
My initmysybase.ora:
HS_FDS_CONNECT_INFO = mysybase
# HS_FDS_TRACE_LEVEL = DEBUG
HS_FDS_TRACE_LEVEL = ON
HS_NLS_NUMERIC_CHARACTER = ",."
HS_LANGUAGE = American
tnsnames.ora:
mysybase =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = WORKSTATION)(PORT = 1521))
(CONNECT_DATA =
(SID = mysybase)
(HS = OK)
listener.ora:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = WORKSTATION)(PORT = 1521))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = mysybase)
(SID_NAME = mysybase)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(PROGRAM = hsodbc)
So, maybe anybody know how to solve this problem?
Thanks,
Yury

I've played with HS_LANGUAGE option but without success.
Well, this is the export from the registry:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\mysybase]
"Driver"="C:\\sybase\\DataAccess\\ODBC\\dll\\sybdrvodb.dll"
"dsprincipal"=""
"secondaryport"=""
"logintimeout"="10"
"dsn"="mysybase"
"restrictmaximumpacketsize"="0"
"initializationstring"=""
"database"=""
"packetsize"=""
"ignoreerrorsifrspending"="0"
"dsservicename"=""
"server"="WORKSTATION"
"serverinitiatedtransactions"="1"
"quotedidentifier"="0"
"charset"="ServerDefault"
"ansinull"="0"
"encryptpassword"="0"
"fetcharraysize"="25"
"language"=""
"buffercachesize"="20"
"trustedfile"=""
"port"="5000"
"userid"="sa"
"hasession"="0"
"tightlycoupledtransaction"="0"
"serverprincipal"=""
"enableserverpacketsize"="1"
"applicationname"=""
"description"=""
"dsurl"=""
"userprincipal"=""
"dynamicprepare"="0"
"crc"="0"
"secondaryserver"=""
"textsize"=""
"clienthostproc"=""
"clienthostname"=""
"codepagetype"="oem"

Similar Messages

  • Sybase odbc driver client unable to establish a connection

    Please some one help me at this. I am new to sysbase.
    I am try to create dsn name for sysbase.
    While connecting sysbase i gave sa as user name and administrator as password.
    Its connecting and show master db and some other db.
    After that i am trying to create dsn. While i creating dsn i gave
    1) Hostname as my system hostname.
    2) Database name as master db
    3) Logon Id as sa (sa is my user name i gave)
    4) Port : 5000
    When i click test connection it asked password. i gave as administrator.
    After few seconds it show sybase odbc driver client unable to establish a connection error.
    I provide screenshot what i did and what error is occured.
    Please guide me at this.

    Hi Srinivasan,
    This is the first thing I noticed. You have a Windows 2012 R2 box. Make sure you install the SDK 15.7 SP130 or later or SDK 16.0 PL04 or later. We just got the SDK certified with the R2 box so the installation runs correctly.
    Second thing, when you run the odbc manager if you are creating a system dsn you need to start the Windows odbc manager as administrator on a Windows 2012 or Windows 8 box or you get permission issues on this system.
    Third thing you should pay attention to is if the application is a 32 or 64 bit application. This decides if you run the 32 or 64 bit Windows odbc manager.
    If your still having problems please tell me and I will investigate. I got a Windows 2012 R2 box with SDK 15.7 SP130 and it seems to be working fine.
    Thanks,
    Dawn Kim

  • [Sybase][ODBC Driver]Null ini

    Hi,
    I have issue with connecting to Sybase ASE after upgrading from base IQ 16 to SP03.
    Unable to connect to server 'SYBASE_ASE': [Sybase][ODBC Driver]Null ini
    file or ini file not found in $SYBASE or current directory
    SQLCODE=-656, ODBC 3 State="HY000"
    Valid .odbc.ini file exists in $SYBASE as well as in $HOME or in current directory.
    Does anyone have same issue with SP03?
    Driver used is libsybdrvodb.so which is pointing to Sybase ASE DataAccess64/lib and is properly loaded with LD_LIBRARY_PATH.
    Thanks,

    The IQ SP03 install does not contain any ASE ODBC driver components.  Most likely you have a path conflict.
    When you install, do you use a different $SYBASE home directory for the IQ installation vs. the ASE installation?  If so, check which $SYBASE is in use, as that points to the 'interfaces' file in use.  Your DSN my be using the interfaces name of the ASE and not the host/port.
    i.e. the IQ.sh script in the $SYBASE used by IQ will call the $SYBASE/SYBASE.sh when it runs.  If you install to a different $SYBASE directory for IQ, then this $SYBASE does not contain an interfaces file.
    Correct your paths or copy the interfaces file from the ASE $SYBASE directory to the IQ $SYBASE directory.
    Chris

  • Crystal Report Oracle ODBC driver invalid Thai character display problem

    Hi,
       My server has CR Oracle ODBC 5.1 installed on last week. We have several reports in the servers which called by our Application to export to text file and pdf file. Sometimes, the output (both text file and pdf file) can't display Thai character correctly. The text file show Thai character in question mark and pdf file show in square box. This problem occur randomly and disappear without doing anything. Sometimes the problem occur for an hour and gone but sometimes occur 10-15 minutes and gone. This problem also not happen every days. Once the problem occur, all reports with Thai character will fail.
       However, we have another server installed the same Application, same OS level, same OS patches and same CR Oracle ODBC driver version installed on the same time as above server (the problem server). This server does not have any problems.
       Any suggestions would be appreciated.
    Best Regards,
    Noppadon S.

    Hi Noppadon,
    Thank you for the info. If it happens randomly in their application then it's something they need to debug. Could even be in the ODBC driver.
    I suggest you tell them that because it works sometimes it shows the issue is likely in their software because if it failed all the time then it would be in Crystal dll's. They need to debug the problem, suggest they use tools like Process Monitor from www.sysinternals.com to step through to see where or what part is failing. If they having logging abilities that may help to find out what step is failing and in which API.
    At this point we have no way of determining where the problem is, it's failing in their application and no one but them know what or how they are using CR runtime files.
    If you can duplicate the problem using Crystal Report Designer then it's our problem, if not they have to help you to show us it is a CR issue.
    Sorry we can't be of more help but without know their code we can't suggest anything to try. Suggest they log a call with support here to help them debug the problem if they don't know what to do.
    Thank you
    Don

  • Microsoft SQL Server ODBC Driver 1.0 for Linux problem

    Hello! I've RedHat Linux 6 Update 1 x64 on VMware Player and MS SQL Server on real machine. My application "servernew" on RedHat. All right, but when i try connect my SQL Server:
    retcode = SQLDriverConnect(hdbc,NULL,string,sizeof(string),buf,sizeof(buf),&StringLength2,SQL_DRIVER_NOPROMPT);
    i get retocde = -1;
    Using SQLGetDiagRec:
    MessageText = Data source name not found, and no default driver specified
    To make my connection i use next attempts for connection string:
    //char constring[200]="Driver={Microsoft Server ODBC Driver 1.0 for Linux};Server=ARTPK2\\SQLEXPRESS2;Database=Kurs;Uid=sa;Pwd=2ef5Fese";
    //char constring[200]="Driver={SQL Server Native Client 11.0};Server=ARTPK2\\SQLEXPRESS2;Database=Kurs;Uid=sa;Pwd=2ef5Fese";
    //char constring[200]="Driver={Microsoft SQL Server ODBC Driver V1.0 for Linux};Server=ARTPK2\\SQLEXPRESS2;Database=Kurs;Uid=sa;Pwd=2ef5Fese";
    //char constring[200]="Driver={/opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1790.0};Server=ARTPK2\\SQLEXPRESS2;Database=Kurs;Uid=sa;Pwd=2ef5Fese";
    char constring[200]="DSN={SQL Server Native Client 11.0};Uid=sa;Pwd=2ef5Fese";
    but...Data source name not found, and no default driver specified .. help me

    Ok. New attempts with sqlcmd:
    [root@localhost ~]# sqlcmd -S 192.168.0.3 -U sa -P 2ef5Fese -d first
    SqlState HYT00, Login timeout expired
    A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information
    see SQL Server Books Online.
    TCP Provider: Error code 0x6F
    New error 0x6F (i turned off firewall in windows).
    [root@localhost ~]# sqlcmd -S ARTPK2\\SQLEXPRESS2 -U sa -P 2ef5Fese -d first
    SqlState HYT00, Login timeout expired
    A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information
    see SQL Server Books Online.
    SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
    It's bad way, but...
    [root@localhost ~]# sqlcmd -D -S ARTPK2\\SQLEXPRESS2 -U sa -P 2ef5Fese -d first
    SqlState IM002, Data source name not found, and no default driver specified
    It's like in my program!!
      retcode = SQLDriverConnect(hdbc,NULL,string,sizeof(string),buf,sizeof     (buf),&StringLength2,SQL_DRIVER_NOPROMPT);
      i get retocde = -1;
      Using SQLGetDiagRec:
      MessageText = Data source name not found, and no default driver specified
    Why "SQLDriverConnect"  is looking for DNS?!

  • Sybase ODBC driver for Linux - handle of numeric data type is not correctly

    Linux RHEL 4 + Oracle 10.2.0.3 - all work fine. But numeric data type does not coorectly show values. I gor driver from ASE 15. Who has already resolve this issue???

    To begin with:
    - what is the table definition in Sybase?
    - what is the table definition in Oracle: SQL> describe <table>@<sybase_hsodbc_link>;
    and probably you need to start a gateway debug trace (HS_FDS_TRACE_LEVEL-DEBUG) and an ODBC trace to see what happens.
    You could paste the appropriate section(s) here. Also paste the init<hsodbc>.ora and odbc.ini .
    Ed

  • ORACLE ODBC Driver & Decimals

    Ok, I think this is a tricky one. One of my programmers has tried to fetch (via oracle's odbc driver) numeric data in a Visual foxpro application. The settings on his PC is codepage 1253 (Greek) and up to now we didnt get any problems regarding greek text going back and forth. But ..(there's always a but)now with numeric values he gets to 'see' the number i.e. 123,45 but once he tries to evaluate or use it in any way the number gets converted into an absolute value i.e. 123 (No rounding, its just like someone chopped the decimal part) Once we change the codepage in the registry into nls_lang into american everything works fine. NPlease understand the difference between this part of the world were the decimal point is a comma and not a dot
    I have already checked the responses on similar questions so heres my query and if anyone knows please guide us.
    Is there a relation between the server language setting and the client? Where should we look for this settings?
    Should the Oracle client language setting be the same as the codepage we are using. If yes what would the equivalent language setting would be for codepage 1253
    Thanking you in advance
    Christos Kyriacou

    1. Identically, best by performance - OO4O.
    2. For programming - no difference, but only OO4O may use some feature's of Oracle.
    In dir: Oracle_HOME\OO4O
    Hello from Russia, [email protected]

  • Sybase ODBC

    Hello,
    I seem to loose this file every month or so. Can someone send me the ZEN 3.2
    sybase odbc driver?
    Thanks Very Much!

    Michael,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at
    http://support.novell.com.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • ODBC Driver V8.00.58.00 Error

    Hi
    I am experimenting an Oracle ODBC error while selecting more than 2500 records from a database table.
    Does anyone known the cause of the error?
    Thanks in advance.
    ==== ENVIRONMENT DESCRIPTION ====
    The database server is ORACLE Version 8.0.5.2.1
    My database table has the following structure:
    CREATE TABLE MY_TABLE
    PK_PKEY NUMBER(9) NOT NULL ,
    FK_FKEY1 NUMBER(9) NOT NULL ,
    FK_FKEY2 NUMBER(5) NOT NULL ,
    FIELD1 NUMBER(1) NOT NULL ,
    FIELD2 NUMBER(5) NOT NULL ,
    CONSTRAINT MY_TABLE_FILED1 CHECK(FIELD1 BETWEEN 0 AND 1),
    CONSTRAINT PK_MY_TABLE_KEY PRIMARY KEY (PK_PKEY)
    The table is populated with 3000 records where FIELD1 is always equal to 1 (this value is relevant for the queries).
    The application that executes the queries to the table is written in Visual C++ 6.0, the database connection is made through ODBC datasouce using the MFC ODBC database classes (CDatabase and CRecordset).
    The Oracle client installed to access the database server is from version: ORACLE ODBC driver - Version 8.00.58.00 - Oracle Corporation SQORA32.DLL 1/5/00.
    The SQL queries executed in the application are:
    QUERY1: SELECT pk_pkey FROM my_table
    QUERY2: SELECT pk_pkey FROM my_table where FIELD1=1
    QUERY3: SELECT pk_pkey FROM my_table where FIELD1=1 ORDER BY pk_pkey
    The C++ application only creates a CDatabase object (m_cDatabase.OpenEx((LPCTSTR)_T(DSN=tc1;UID=myuser;PWD=mypwd))) and a CRecordset object with the previous created database connection. The queries are executed using a simple procedure described in the end of the email.
    I test several combinations using the queries described above and the results are quite different. The combinations performed where:
    TEST1 - First QUERY2 then QUERY3 RESULT 1
    TEST2 - First QUERY1 then QUERY3 RESULT 1
    TEST3 - First QUERY3 then QUERY2 RESULT 2
    TEST4 - First QUERY3 then QUERY1 RESULT 1
    TEST5 - First QUERY1 then QUERY2 RESULT 1
    TEST6 - First QUERY2 then QUERY1 RESULT 3
    TEST7 - First QUERY1 then QUERY1 RESULT 3
    TEST8 - First QUERY2 then QUERY2 RESULT 3
    TEST9 - First QUERY3 then QUERY3 RESULT 3
    == RESULT DESCRIPTIONS ==
    - RESULT 1
    The first query is executed successfully but the application catches a database exception when executing the second query.
    Database Exception: Restricted data type attribute violation
    State: 07006, Native:0, Origin:[ORACLE][ODBC]
    - RESULT 2
    The first query is executed successfully but the application crash while executing the second query.
    The application does not catch any database exception.
    The crash description is:
    Unhanded exception Application.exe (SQORA32.DLL):0xC0000005 Access Violation
    - RESULT 3
    The queries returned the expected results. No errors where reported.
    ==== END OF ENVIRONMENT DESCRIPTION ====
    *** VERY IMPORTANT NOTE ***
    1. Each test generates a log file where it is possible to confirm the results of the tests.
    2. Another element is that the number of times the first query is consecutive executed before the second one does not influence the result of the tests.
    3. The error is reported always after the 2500 record is fetch.
    4. I executed exactly the same test where the only modification was the version of the ODBC driver used in the client and the tests ran successfully. The results are correct if the client driver is one of the following:
    ORACLE ODBC driver - Version 8.01.05.00 - Oracle Corporation SQORA32.DLL 16/02/1999
    ORACLE ODBC driver - Version 8.00.05.00 - Oracle Corporation SQORA32.DLL 06/12/1998
    5. I also executed the tests with the ORACLE ODBC driver version 8.00.59.00 and the results where the same as from driver v8.00.58.00
    6. If I create a restriction in the queries to return less than 2500 records the test are performed successful in all drivers.
    == PROCEDURE ==
    All the queries are executed in a simple procedure like:
    bool CTesteDBDlg::ExecuteTeste(void)
    int nIndex = 1;
    CString strSQL;
    CString strText;
    try
    CRecordset cRecordset(&m_cDatabase);
    strSQL.Format(_T("SELECT pk_pkey FROM my_table"));
    //strSQL.Format(_T("SELECT pk_pkey FROM my_table WHERE field1=1"));
    //strSQL.Format(_T("SELECT pk_pkey FROM my_table WHERE field1=1 ORDER BY pk_pkey"));
    if(!cRecordset.Open(CRecordset::snapshot, (LPCTSTR)strSQL,
    CRecordset::readOnly))
    return false;
    CString strDBValue;
    while(!cRecordset.IsEOF())
    cRecordset.GetFieldValue((int)0, strDBValue);
    LOG_DEBUG_MESSAGE(eLow,(_T("ExecuteTeste1: Index=%ld - Value=%s"), nIndex, strDBValue));
    nIndex++;
    cRecordset.MoveNext();
    catch(CDBException* pDBException)
    TCHAR szCauze[256];
    pDBException->GetErrorMessage(szCauze, 255);
    LOG_DEBUG_MESSAGE(eLow,(_T("Database Exception: Code=%d - Desc = %s"), pDBException->m_nRetCode, szCauze));
    return false;
    return true;
    null

    Mr. Cordeiro sent me the project and data he's using. When I run the test program on my 8.0.6 client machine with the 8.0.6 ODBC driver, I see no failures. When I run the test program on my 8.1.6 client machine with the 8.1.6.1 driver, however, I see the problems Mr. Cordeiro describes. If I install the current evelopment build of our 8.1.6 driver, however, the problems disappear. Unfortunately, I don't have an 8.0.5 client machine to test on right now.
    I suspect that the problem here has been identified previously, has already been fixed, and will be shipped with the next release of the driver.
    My only hesitation here is that the 8.0.5.8 and 8.0.6.0 ODBC drivers are identical code, just linked with different client libraries, so it's unclear why the 8.0.6 client is working while the 8.0.5 client, apparently, is failing. It is possible that there is/was a bug in one of the layers under the ODBC driver which is causing the problem and that different versions of our code hit or miss this problem. I would strongly suggest that you apply the latest Oracle patch kit for your client (i.e. 8.0.5.2.6 for the 8.0.5 client) to see if that fixes your problem. These patch kits are available from the Oracle FTP site-
    ftp://oracle-ftp.oracle.com/server/patchsets/wgt_tech/server/windowsNT/
    Justin Cave
    ODBC Development

  • ODBC Driver with Access problem

    I have problems with fields of the number(9.3) datatype. in my linked access tables numbers like 1555.33 are shown as 155533.
    I'm using the oracle odbc driver version 9.2.0.54 with a 9i (9.2.0.1.0) Database.
    I've reading at an old post called "number(9.3) DataType in MS Access". Where I've found someone with the same problem as me. I've done everythink which is explained on that message, but it still doesn't work.
    Is there anything else to do?
    Thank you in advance!

    The following is extracted from Oralce's Metalink: (sorry lost the link)
    "This is an NLS related issue. The ODBC driver uses the values derived from the NLS_LANG setting from the Oracle Home where the driver is installed.
    The application actually uses the number setting from the NT Regional Settings.
    When these two settings differ, then the decimal character will be cut off. This behaviour is also described in Bug:694323.
    Example:
    You have set your NLS_LANG in the ORACLE_HOME of your ODBC driver to GERMAN_GERMANY.WE8ISO8859P1. This will result in a value for the NLS_NUMERIC_CHARACTERS of ",." (the first part of the NLS_NUMERIC_CHARACTERS being the decimal character and the second part being the group separator).
    So the "." is used by the Application and the "," is used by the Oracle ODBC driver.
    As a result numeric values in your Oracle Database with an integer and a decimal part will thus be displayed by the application without the decimal character, i.e. a value of 10,734 will be displayed as 10734 a value of 0,123 will be displayed as 123.
    To fix this, you will either have to correct the character used for the Decimal Symbol of your NT Regional settings to match the value of your Oracle NLS_LANG setting or vice versa. To change the value for NLS_LANG, go to your registry and change the NLS_LANG parameter that is situated under HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/HOMEnnn/NLS_LANG where HOMEnnn is the home where your Oracle ODBC driver is installed."
    Hope this helps, resolved our issue with this problem.

  • Using SQLBindParameter, SQLPrepare and SQLExecute to insert a Decimal(5,3) type fails with SQLSTATE: 22003 using ODBC Driver 11 for SQL Server

    Hello everyone.
    I'm using SQL Server 2014, and writting on some C++ app to query and modify the database. I use the ODBC API.
    I'm stuck on inserting an SQL_NUMERIC_STRUCT value into the database, if the corresponding database-column has a scale set.
    For test-purposes: I have a Table named 'decTable' that has a column 'id' (integer) and a column 'dec' (decimal(5,3))
    In the code I basically do:
    1. Connect to the DB, get the handles, etc.
    2. Use SQLBindParameter to bind a SQL_NUMERIC_STRUCT to a query with parameter markers. Note that I do include the information about precision and scale, something like: SQLBindParameter(hstmt, 2, SQL_PARAM_INPUT, SQL_C_NUMERIC, SQL_NUMERIC, 5, 3, &numStr,
    sizeof(cbNum), &cbNum);
    3. Prepare a Statement to insert values, something like: SQLPrepare(hstmt, L"INSERT INTO decTable (id, dec) values(?, ?)", SQL_NTS);
    4. Set some valid data on the SQL_NUMERIC_STRUCT
    5. Call SQLExecute to execute. But now I get the error:
    SQLSTATE: 22003; nativeErr: 0 Msg: [Microsoft][ODBC Driver 11 for SQL Server]Numeric value out of range
    I dont get it what I am doing wrong. The same code works fine against IBM DB2 and MySql. I also have no problems reading a SQL_NUMERIC_STRUCT using SQLBindCol(..) and the various SQLSetDescField to define the scale and precision.
    Is there a problem in the ODBC Driver of the SQL Server 2014?
    For completeness, here is a working c++ example:
    // InsertNumTest.cpp
    // create database using:
    create a table decTable with an id and a decimal(5,3) column:
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE[dbo].[decTable](
    [id][int] NOT NULL,
    [dec][decimal](5, 3) NULL,
    CONSTRAINT[PK_decTable] PRIMARY KEY CLUSTERED
    [id] ASC
    )WITH(PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON[PRIMARY]
    ) ON[PRIMARY]
    GO
    // Then create an odbc DSN entry that can be used:
    #define DSN L"exOdbc_SqlServer_2014"
    #define USER L"exodbc"
    #define PASS L"testexodbc"
    // system
    #include <iostream>
    #include <tchar.h>
    #include <windows.h>
    // odbc-things
    #include <sql.h>
    #include <sqlext.h>
    #include <sqlucode.h>
    void printErrors(SQLSMALLINT handleType, SQLHANDLE h)
        SQLSMALLINT recNr = 1;
        SQLRETURN ret = SQL_SUCCESS;
        SQLSMALLINT cb = 0;
        SQLWCHAR sqlState[5 + 1];
        SQLINTEGER nativeErr;
        SQLWCHAR msg[SQL_MAX_MESSAGE_LENGTH + 1];
        while (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO)
            msg[0] = 0;
            ret = SQLGetDiagRec(handleType, h, recNr, sqlState, &nativeErr, msg, SQL_MAX_MESSAGE_LENGTH + 1, &cb);
            if (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO)
                std::wcout << L"SQLSTATE: " << sqlState << L"; nativeErr: " << nativeErr << L" Msg: " << msg << std::endl;
            ++recNr;
    void printErrorsAndAbort(SQLSMALLINT handleType, SQLHANDLE h)
        printErrors(handleType, h);
        getchar();
        abort();
    int _tmain(int argc, _TCHAR* argv[])
        SQLHENV henv = SQL_NULL_HENV;
        SQLHDBC hdbc = SQL_NULL_HDBC;
        SQLHSTMT hstmt = SQL_NULL_HSTMT;
        SQLHDESC hdesc = SQL_NULL_HDESC;
        SQLRETURN ret = 0;
        // Connect to DB
        ret = SQLAllocHandle(SQL_HANDLE_ENV, NULL, &henv);
        ret = SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, SQL_IS_INTEGER);
        ret = SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
        ret = SQLConnect(hdbc, (SQLWCHAR*)DSN, SQL_NTS, USER, SQL_NTS, PASS, SQL_NTS);
        if (!SQL_SUCCEEDED(ret))
            printErrors(SQL_HANDLE_DBC, hdbc);
            getchar();
            return -1;
        ret = SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);
        // Bind id as parameter
        SQLINTEGER id = 0;
        SQLINTEGER cbId = 0;
        ret = SQLBindParameter(hstmt, 1, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_INTEGER, 0, 0, &id, sizeof(id), &cbId);
        if (!SQL_SUCCEEDED(ret))
            printErrorsAndAbort(SQL_HANDLE_STMT, hstmt);
        // Bind numStr as Insert-parameter
        SQL_NUMERIC_STRUCT numStr;
        ZeroMemory(&numStr, sizeof(numStr));
        SQLINTEGER cbNum = 0;
        ret = SQLBindParameter(hstmt, 2, SQL_PARAM_INPUT, SQL_C_NUMERIC, SQL_NUMERIC, 5, 3, &numStr, sizeof(cbNum), &cbNum);
        if (!SQL_SUCCEEDED(ret))
            printErrorsAndAbort(SQL_HANDLE_STMT, hstmt);
        // Prepare statement
        ret = SQLPrepare(hstmt, L"INSERT INTO decTable (id, dec) values(?, ?)", SQL_NTS);
        if (!SQL_SUCCEEDED(ret))
            printErrorsAndAbort(SQL_HANDLE_STMT, hstmt);
        // Set some data and execute
        id = 1;
        SQLINTEGER iVal = 12345;
        memcpy(numStr.val, &iVal, sizeof(iVal));
        numStr.precision = 5;
        numStr.scale = 3;
        numStr.sign = 1;
        ret = SQLExecute(hstmt);
        if (!SQL_SUCCEEDED(ret))
            printErrorsAndAbort(SQL_HANDLE_STMT, hstmt);
        getchar();
        return 0;

    This post might help:
    http://msdn.developer-works.com/article/12639498/SQL_C_NUMERIC+data+incorrect+after+insert
    If this is no solution try increasing the decimale number on the SQL server table, if you stille have the same problem after that change the column to a nvarchar and see the actual value that is put through the ODBC connector for SQL.

  • Problems with JDBC-ODBC Driver

    Hello,
    I am trying to access a DSN on my windows with a dedicated DB driver of some company. so i used the JDBC-ODBC connector.
    when launching the java code, and debugging the problem i get the following error:
    DriverManager.getConnection("jdbc:odbc:priority32;UID=Manager;PWD=keren")
        trying driver--className=com.mysql.jdbc.Driver,com.mysql.jdbc.Driver@16caf43--
        trying driver--className=sun.jdbc.odbc.JdbcOdbcDriver,sun.jdbc.odbc.JdbcOdbcDriver@66848c--
    *Driver.connect (jdbc:odbc:priority32;UID=Manager;PWD=keren)
    JDBC to ODBC Bridge: Checking security
    No SecurityManager present, assuming trusted application/applet
    JDBC to ODBC Bridge 2.0001
    Current Date/Time: Tue Aug 12 07:50:37 VET 2008
    Loading JdbcOdbc library
    Allocating Environment handle (SQLAllocEnv)
    hEnv=50338088
    Allocating Connection handle (SQLAllocConnect)
    hDbc=50338256
    Connecting (SQLDriverConnect), hDbc=50338256, szConnStrIn=DSN=priority32;UID=Manager;PWD=keren
    *Connection.getMetaData
    *DatabaseMetaData.getDriverName
    Get connection info string (SQLGetInfo), hDbc=50338256, fInfoType=6, len=300
    tabula.dll
    *DatabaseMetaData.getDriverVersion
    Get connection info string (SQLGetInfo), hDbc=50338256, fInfoType=7, len=300
    07.00.0000
    *DatabaseMetaData.getDriverName
    Get connection info string (SQLGetInfo), hDbc=50338256, fInfoType=6, len=300
    tabula.dll
    Driver name:    JDBC-ODBC Bridge (tabula.dll)
    *DatabaseMetaData.getDriverVersion
    Get connection info string (SQLGetInfo), hDbc=50338256, fInfoType=7, len=300
    07.00.0000
    Driver version: 2.0001 (07.00.0000)
    Caching SQL type information
    *Connection.getMetaData
    *DatabaseMetaData.getTypeInfo
    Allocating Statement Handle (SQLAllocStmt), hDbc=50338256
    hStmt=50339424
    Get type info (SQLGetTypeInfo), hStmt=50339424, fSqlType=0
    Number of result columns (SQLNumResultCols), hStmt=50339424
    value=15
    Get connection info string (SQLGetInfo), hDbc=50338256, fInfoType=10, len=300
    03.52.0000
    Fetching (SQLFetch), hStmt=50339424
    Column attributes (SQLColAttributes), hStmt=50339424, icol=1, type=2
    value (int)=12
    Column attributes (SQLColAttributes), hStmt=50339424, icol=1, type=3
    value (int)=129
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    CHAR
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=12
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    CHAR(1)
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=1
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    RCHAR
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=12
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    REAL
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=6
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    INT
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=4
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    UNSIGNED
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=4
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    TIME
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=10
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    DATE
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=11
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    DATE
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=9
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    DAY
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=4
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    DECIMAL
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=3
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    End of result set (SQL_NO_DATA)
    *ResultSet.close
    Free statement (SQLFreeStmt), hStmt=50339424, fOption=1
    *ResultSet has been closed
    Get connection info (SQLGetInfo), hDbc=50338256, fInfoType=44
    int value=0
    Get connection info (SQLGetInfo), hDbc=50338256, fInfoType=121
    RETCODE = -1
    ERROR - Generating SQLException...
    SQLState(S1096) vendor code(0)
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Information type out of range
        at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbc.SQLGetInfo(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcConnection.checkBatchUpdateSupport(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at WigsUpdate.main(WigsUpdate.java:25)
    getConnection returning driver--className=sun.jdbc.odbc.JdbcOdbcDriver,sun.jdbc.odbc.JdbcOdbcDriver@66848c--what can be done?
    thank you very much

    HimberJack wrote:
    oh now i understand.
    i got a very unknown company which supplied the ODBC driver, but they dont have java driver...
    so I have nothing to do about it?The choices are find a different driver or use the one you have.
    The one you have doesn't do batches.
    Finding a different driver could involve the following.
    - Buying one from somewhere else
    - Pay someone to write one.
    - Write a driver yourself.
    All of those are somewhat dependent that the "unknown company" has an API that supports that. You (or someone) could also figure out the file format of the "unknown company" as well and then write one.

  • Sybase ASE 15.7.103 ODBC Driver invalid descriptor index

    Hey guys,
    after migration from oracle nuc to sybase ase 15.7.101 unicode and implementation of sapnote 1558958 (dbacockpit collection for NW 702) there were everything which was in dbacockpit displayed ok.
    After upgrade to patch 103 theres a problem in the dbacockpit. I will show in the register Database SID - Space - Tables and Indices - Tables.
    After I select this. There comes follwing error: ASE Error SQL30013:07009][SAP][ASE ODBC Driver]Invalid descriptor index.
    In error details I see SQLCode 30013
    The Database ist open and there are no other kown problems with connection. SAP could establish connection to sybase ase database and users can work normally.
    In the dbacockpit Database SID - Space - Devices and Databases are shown without problems.
    message details:
    Exception CX_DBA_ADBC in class CL_SYB_RDI_QUERY method GET_TABLES_SPACE line 217
    Kernel Error ID:
    WP ID: 4
    WP PID: 4272
    SYSID: SE1
    SY-SUBRC: 0
    SQL statement: SELECT TOP 50 DBNAME, USER_NAME AS TABOWNER, TAB_NAME AS TABNAME, ' ' AS PARTITIONNAME, 0 AS ID, 0 AS PARTITIONID, ' ' AS SNAPSHOT_TIMESTAMP, ' ' AS TIMESTAMP_FROM, ' ' AS TIMESTAMP_TO, SUM(TIME_PERIOD) AS TIME_PERIOD, AVG(ROW_COUNT) AS ROW_COUNT, MAX(ROW_COUNT) AS ROW_COUNT_MAX, AVG(TAB_RESERVED_LOB_KB) AS TAB_RESERVED_LOB_KB, MAX(TAB_RESERVED_LOB_KB) AS TAB_RESERVED_LOB_KB_MAX, AVG(TAB_USED_LOB_KB) AS TAB_USED_LOB_KB, MAX(TAB_USED_LOB_KB) AS TAB_USED_LOB_KB_MAX, AVG(TAB_DATA_LOB_KB) AS TAB_DATA_LOB_KB, MAX(TAB_DATA_LOB_KB) AS TAB_DATA_LOB_KB_MAX, AVG(TAB_DATA_UTL_KB) AS TAB_DATA_UTL_KB, MAX(TAB_DATA_UTL_KB) AS TAB_DATA_UTL_KB_MAX, AVG(TAB_DATAPGCLRATIO)*100 AS TAB_DATAPGCLRATIO, MIN(TAB_DATAPGCLRATIO)*100 AS TAB_DATAPGCLRATIO_MIN, AVG(TAB_LRGIOEFF)*100 AS TAB_LRGIOEFF, MIN(TAB_LRGIOEFF)*100 AS TAB_LRGIOEFF_MIN, AVG(DATACHANGE) AS DATACHANGE, MAX(DATACHANGE) AS DATACHANGE_MAX, AVG(forwrowcnt) AS forwrowcnt, MAX(forwrowcnt) AS forwrowcnt_MAX, AVG(delrowcnt) AS delrowcnt, MAX(delrowcnt) AS delrowcnt_MAX, AVG(extent0pgcnt) AS extent0pgcnt, MAX(extent0pgcnt) AS extent0pgcnt_MAX, AVG(oamapgcnt) AS oamapgcnt, MAX(oamapgcnt) AS oamapgcnt_MAX, AVG(oampagecnt) AS oampagecnt, MAX(oampagecnt) AS oampagecnt_MAX, MAX(str_replace(str_replace(str_replace(convert(VARCHAR(19),statmoddate,23),':',NULL),'-',NULL),'T',NULL)) AS statmoddate, AVG(datarowsize) AS datarowsize, MAX(datarowsize) AS datarowsize_MAX, AVG(TAB_DATA_TOTAL_KB) AS TAB_DATA_TOTAL_KB, MAX(TAB_DATA_TOTAL_KB) AS TAB_DATA_TOTAL_KB_MAX, AVG(TAB_DATA_UTL_TOTAL_KB) AS TAB_DATA_UTL_TOTAL_KB, MAX(TAB_DATA_UTL_TOTAL_KB) AS TAB_DATA_UTL_TOTAL_KB_MAX, AVG(TAB_USED_TOTAL_KB) AS TAB_USED_TOTAL_KB, MAX(TAB_USED_TOTAL_KB) AS TAB_USED_TOTAL_KB_MAX, AVG(TAB_RESERVED_TOTAL_KB) AS TAB_RESERVED_TOTAL_KB, MAX(TAB_RESERVED_TOTAL_KB) AS TAB_RESERVED_TOTAL_KB_MAX, AVG(TAB_UNUSED_TOTAL_KB) AS TAB_UNUSED_TOTAL_KB, MAX(TAB_UNUSED_TOTAL_KB) AS TAB_UNUSED_TOTAL_KB_MAX FROM ( SELECT DBNAME, USER_NAME, TAB_NAME, SNAPSHOT_TIMESTAMP AS SNAPSHOT_TIMESTAMP, SUM(TIME_PERIOD) AS TIME_PERIOD, SUM(ROW_COUNT) AS ROW_COUNT, SUM(TAB_RESERVED_LOB_KB) AS TAB_RESERVED_LOB_KB, SUM(TAB_USED_LOB_KB) AS TAB_USED_LOB_KB, SUM(TAB_DATA_LOB_KB) AS TAB_DATA_LOB_KB, SUM(TAB_DATA_UTL_KB) AS TAB_DATA_UTL_KB, CASE WHEN SUM(ROW_COUNT) > 0 THEN SUM(ROW_COUNT*TAB_DATAPGCLRATIO) / SUM(ROW_COUNT) ELSE 1 END AS TAB_DATAPGCLRATIO, CASE WHEN SUM(ROW_COUNT) > 0 THEN SUM(ROW_COUNT*TAB_LRGIOEFF) / SUM(ROW_COUNT) ELSE 1 END AS TAB_LRGIOEFF, CASE WHEN SUM(ROW_COUNT+delrowcnt) > 0 THEN SUM((ROW_COUNT+delrowcnt)*DATACHANGE) / SUM(ROW_COUNT+delrowcnt) ELSE 0 END AS DATACHANGE, SUM(forwrowcnt) AS forwrowcnt, SUM(delrowcnt) AS delrowcnt, SUM(extent0pgcnt) AS extent0pgcnt, SUM(oamapgcnt) AS oamapgcnt, SUM(oampagecnt) AS oampagecnt, MAX(statmoddate) AS statmoddate, CASE WHEN SUM(ROW_COUNT) > 0 THEN SUM(ROW_COUNT*datarowsize) / SUM(ROW_COUNT) ELSE 0 END AS datarowsize, SUM(TAB_DATA_KB+TAB_DATA_LOB_KB) AS TAB_DATA_TOTAL_KB, SUM(TAB_DATA_UTL_KB+TAB_DATA_LOB_KB) AS TAB_DATA_UTL_TOTAL_KB, SUM(TAB_USED_KB+TAB_USED_LOB_KB) AS TAB_USED_TOTAL_KB, SUM(TAB_RESERVED_KB+TAB_RESERVED_LOB_KB) AS TAB_RESERVED_TOTAL_KB, SUM((TAB_RESERVED_KB+TAB_RESERVED_LOB_KB) - (TAB_USED_KB+TAB_USED_LOB_KB)) AS TAB_UNUSED_TOTAL_KB FROM saptools..DBH_STG_TABLES WHERE SNAPSHOT_TIMESTAMP >= dateadd(ss,TIME_PERIOD,?) AND SNAPSHOT_TIMESTAMP <= dateadd(ss,5,?) AND BDOP = 1 AND BDOI = 0 GROUP BY DBNAME, USER_NAME, TAB_NAME, SNAPSHOT_TIMESTAMP ) AS STD_AGGR GROUP BY DBNAME, USER_NAME, TAB_NAME ORDER BY TAB_RESERVED_TOTAL_KB DESC AT ISOLATION READ UNCOMMITTED
    Database: +++SYBADM
    caused by
    Exception CX_SQL_EXCEPTION in class CL_SQL_RESULT_SET
    Kernel Error ID:
    DB Error: Yes
    SQL Code: 30013
    SQL Message: [ASE Error SQL30013:07009][SAP][ASE ODBC Driver]Invalid descriptor index
    DB Object Exists: No
    Duplicated Key: No
    Internal Error: 1
    Invalid Cursor: No
    Unknown Connection: No
    Connection Closed: No

    Thanks Mr Model-Bosch,
    we have installed the latest dbsl Patch 213. And we have installed the Patch Collection twice as described in SAP Note 1558958.
    So I have to wait. I hope my SAP Message will be edited soon.

  • Problem setting up DSN for 10g ODBC driver

    Hello,
    I am simply trying to install an ODBC driver for 10g. To accomplish this, I first downloaded the odbc driver for 10g 10.2.0.2.0. The Readme notes said that I need to install the odbc driver using the Oracle Universal Installer. So I got a copy of just the OUI from our DBA. I installed the OUI 10.2. Using the installer, I installed the 10.2.0.2.0 odbc driver. The Readme notes said to look for the file "products.jar", which was not available, but "products.xml" was, so I used "products.xml", and the driver installed successfully.
    The next step was to set up an ODBC DSN for this driver. When I attempted to do this, the Microsoft ODBC Administrator threw this message: The setup routines for the Oracle in DEFAULT_HOME ODBC driver could not be loaded due to system error code 127, followed by Could not load the setup of translator library.
    Other threads suggested that I copy the DLLs mfc71.dll, msvcrt.dll, and msvcr71.dll from my C:\Windows\System32 directory to the directory where I installed the odbc driver (C:\orant\BIN) and to ensure that this directory path was defined under the PATH environmental variable. I followed all these instructions but to no avail - I am still having the same problem. PLEASE HELP!!! Thanks in advance!!

    Hi,
    >>could not be loaded due to system error code 127
    Did you try install it on other machine ? Maybe this current machine has a DLL versions problems ...
    Cheers

  • Problem using JDBC to connect to WBEM ODBC driver

    Hello,
    I've got a problem to connect to WBEM ODBC driver using JDBC. The error is:
    exception due a la requetejava.sql.SQLException: [Microsoft][WBEM ODBC Driver]Unable to connect
    When I try to connect to a MS access database, replacing only the ODBC source name, it's working. I can access to the MS access db. But when I put the WMI ODBC source name, WMI, I've got this error.
    Does anybody know what could happened? Is it possible to access to WMI through JDBC? With MS access, accessing WMI ODBC is working !
    Thanks very much for your help.
    Here is the part of the source code :
    import java.sql.*;
    import java.io.*;
    public class Main_1 {
    /** Creates a new instance of Main_1 */
    public Main_1() {
    * @param args the command line arguments
    public static void main(String[] args) {
    try {
    String url = "jdbc:odbc:WMI";
    Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection(url);     
    String query = "Select * from Win32_Processor";
    //String query = "Select * from test;";
    ResultSet results;
    Statement stmt = con.createStatement();
    results = stmt.executeQuery(query);
    //System.out.println (results);
    catch(Exception e){
         System.out.println("exception due a la requete" + e);
    e.printStackTrace();
    }

    you have to first start the network listener before you can run the program
    start TNSLSNR before running the jdbc program

Maybe you are looking for

  • MY imac G5 isight camera drops my video conversations

    When ever I initiate a video chat with anyone I could never chat with them. A message appears that says, that I did not respond. But when the other party initiates a video chat, they can see me for like a few seconds and then the chat ends abruptly.

  • Best Strategy for Managing Laptops in a Mixed InTune / SCCM 2012 World

    We're interested in leveraging Intune to help secure and update our roaming laptop users. We have a group of domain-joined laptops that spend a good deal of time off the company network. We thought we could use Intune to make sure these machines stay

  • Possibility of variable data

    I am creating a one off sales presentation for a client. They would like to be able to tailor the presentation to each individual contact by personalizing a headline with their name, much like variable data. Is it possible to accomplish this without

  • Mac Pro 1,1 Hard drive failure... sorta. Then not.

    I have a MacPro 1,1 Quad core 2.66 processor, with what I believe is the original 250 Gb hard drive. I'm running OSX 10.7.5. Today when I powered it on, I could hear the hard drive spooling up (same sound as normal) then I heard 6 clicks and could he

  • How to Reduce and Copy on HP Officejet 4620

    I am trying to reduce a document to 60% and copy it.  Since I can't find a user's guide for Officejet 4620, can anyone please tell me how to do it? This question was solved. View Solution.