ODBC & Unicode

I have a connection to an Oracle 8.1.7 db via Oracle ODBC 8.1.6.
The characterset is al24utffss.
The connection is good because I am able to get data into MS Excel using MS Query.
The problem is that data from other languages aren't being displayed as Unicode.
Excel isn't causing it because I have similar problems with other applications that use the ODBC driver.
My NLS_LANG parameter is set properly.

The Oracle ODBC driver is certainly capable of returning Unicode data. Generally, when this sort of problem occurs, it is because the client applications aren't requesting Unicode data or because the operating system cannot display certain Unicode characters properly.
You may be able to solve your problem by enabling the 'force SQL_WCHAR' option in the DSN configuration.
Justin

Similar Messages

  • JDBC ODBC Unicode

    Hi
    I am having problems inserting a record with nvarchar2, and nchar field using a PreparedStatement into Oracle
    with
    oracle.jdbc.driver.OracleDriver
    getting
    java.sql.SQLException: ORA-12704: character set mismatch
    ---------------------- CODE ----------------
    preparedStatement.setString( 1, rockId );
    preparedStatement.setInt( 2, userId );
    String aclIdString = String.valueOf(aclId);
    preparedStatement.setString( 3, aclIdString);
    //perform the query
    int insertedRows = preparedStatement.executeUpdate();
    Please help!!

    Hi, have you resolved the problem... I'm still trying 2 find a solution for Oracle 8i database, Please let me know if have found a solution...
    Well, i have a solution for u, but can only be used with 9i databases...
    The probable solution is to use the following lines of code:
    statement = connection.prepareStatement(sql.toString());
    ((OraclePreparedStatement)statement).setFormOfUse(1, OraclePreparedStatement.FORM_NCHAR);
    statement.setString(1,text);
    :p

  • Problem with boolean type in Informix via ODBC

    Hello,
    I'm connecting to an Informix database from an Oracle database via the ODBC Gateway. The connection works fine.
    However, when I select a boolean type column from a table in the Informix database, nothing is returned and I get the following error:
    SQL> select "stat" from bt@informix;
    ERROR:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Informix][Informix ODBC Driver]Restricted data type attribute violation.
    {07006,NativeErr = -11013}
    ORA-02063: preceding 2 lines from INFORMIX
    no rows selected
    Selecting a boolean type column with isql works fine. Other column types work from Oracle.
    Can anyone help me resolve this issue? Please find configuration details and traces below.
    Software stack:
    Informix Database: Enterprise Edition 12.10 for Linux x86_64
    Informix ODBC driver: Informix Client SDK Developer Edition 4.10 for Linux 64-bit
    Oracle Database: Enterprise Edition 11.2.0.1.0 64-bit (Oracle Linux 6.6 64-bit)
    UnixODBC: 2.3.2 x86_64
    odbcinst.ini:
    [Informix]
    Driver=/opt/IBM/informix/lib/cli/libifcli.so
    Setup=/opt/IBM/informix/lib/cli/libifcli.so
    APILevel=1
    ConnectFunctions=YYY
    DriverODBCVer=03.51
    FileUsage=0
    SQLLevel=1
    smProcessPerConnect=Y
    [ODBC]
    TraceFile=/tmp/odbc.log
    Trace = Yes
    odbc.ini:
    [ol_informix1210]
    Driver=Informix
    Description=Test connection
    Database=sysutils
    LogonID=informix
    pwd=informix
    Servername=ol_informix1210
    CursorBehavior=0
    DB_LOCALE=en_us.8859-1
    TRANSLATIONDLL=/opt/IBM/informix/lib/esql/igo4a304.so
    [ODBC]
    UNICODE=UCS-2
    ; Trace file Section
    Trace=1
    TraceFile=/tmp/odbctrace.out
    InstallDir=/opt/IBM/informix
    TRACEDLL=idmrs09a.so
    Oracle Gateway init.ora:
    HS_FDS_CONNECT_INFO=ol_informix1210
    HS_FDS_SHAREABLE_NAME=/usr/local/lib/libodbc.so
    HS_FDS_TRACE_LEVEL=debug
    HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1
    Oracle Gateway trace:
    Entered hgoftch, cursor id 1 at 2015/04/14-12:22:03
    hgoftch, line 130: Printing hoada @ 0x2007fe0
    MAX:1, ACTUAL:1, BRC:100, WHT=5 (SELECT_LIST)
    hoadaMOD bit-values found (0x20:NEGATIVE_HOADADTY)
    DTY     NULL-OK  LEN  MAXBUFLEN   PR/SC  CST IND MOD NAME
    -7 BIT Y          1          1   0/  0    0   0  20 stat
    Performing delayed open.
    SQLBindCol: column 1, cdatatype: -28, bflsz: 1
    Entered hgopoer at 2015/04/14-12:22:03
    hgopoer, line 233: got native error -11013 and sqlstate 07006; message follows...
    [Informix][Informix ODBC Driver]Restricted data type attribute violation. {07006,NativeErr = -11013}
    Exiting hgopoer, rc=0 at 2015/04/14-12:22:03
    hgoftch, line 730: calling SQLFetch got sqlstate 07006
    0 rows fetched
    Exiting hgoftch, rc=28500 at 2015/04/14-12:22:03 with error ptr FILE:hgoftch.c LINE:730 FUNCTION:hgoftch() ID:Fetch resultset data
    ODBC trace:
    [ODBC][11041][1429005970.973443][SQLPrepare.c][196]
                    Entry:
                            Statement = 0x276ecb0
                            SQL = [SELECT A1. stat  FROM  BT  A1][length = 29]
    [ODBC][11041][1429005970.973914][SQLPrepare.c][371]
                    Exit:[SQL_SUCCESS]
    [ODBC][11041][1429005970.973940][SQLNumResultCols.c][156]
                    Entry:
                            Statement = 0x276ecb0
                            Column Count = 0x26f5868
    [ODBC][11041][1429005970.973970][SQLNumResultCols.c][248]
                    Exit:[SQL_SUCCESS]
                            Count = 0x26f5868 -> 1
    [ODBC][11041][1429005970.974097][SQLDescribeCol.c][247]
                    Entry:
                            Statement = 0x276ecb0
                            Column Number = 1
                            Column Name = 0x7fffc3ff2d90
                            Buffer Length = 31
                            Name Length = 0x7fffc3ff2ed4
                            Data Type = 0x7fffc3ff2ed8
                            Column Size = 0x7fffc3ff2e70
                            Decimal Digits = 0x7fffc3ff2edc
                            Nullable = 0x7fffc3ff2ee0
    [ODBC][11041][1429005970.974140][SQLDescribeCol.c][501]
                   Exit:[SQL_SUCCESS]               
                            Column Name = [stat]               
                            Data Type = 0x7fffc3ff2ed8 -> -7               
                            Column Size = 0x7fffc3ff2e70 -> 1               
                            Decimal Digits = 0x7fffc3ff2edc -> 0               
                            Nullable = 0x7fffc3ff2ee0 -> 1
    [ODBC][11041][1429005970.974192][SQLSetStmtAttr.c][265]
                    Entry:
                            Statement = 0x276ecb0
                            Attribute = SQL_ATTR_ROW_ARRAY_SIZE
                            Value = 0x64
                            StrLen = 0
    [ODBC][11041][1429005970.974218][SQLSetStmtAttr.c][925]
                    Exit:[SQL_SUCCESS]
    [ODBC][11041][1429005970.974230][SQLSetStmtAttr.c][265]
                    Entry:
                            Statement = 0x276ecb0
                            Attribute = SQL_ATTR_ROW_BIND_TYPE
                            Value = (nil)
                            StrLen = -5
    [ODBC][11041][1429005970.974249][SQLSetStmtAttr.c][925]
                    Exit:[SQL_SUCCESS]
    [ODBC][11041][1429005970.974837][SQLExecute.c][187]
                    Entry:
                            Statement = 0x276ecb0
    [ODBC][11041][1429005970.975231][SQLExecute.c][348]
                    Exit:[SQL_SUCCESS]
    [ODBC][11041][1429005970.975255][SQLSetStmtAttr.c][265]
                    Entry:
                            Statement = 0x276ecb0
                            Attribute = SQL_ATTR_ROW_STATUS_PTR
                            Value = 0x27f5b78
                            StrLen = -4
    [ODBC][11041][1429005970.975280][SQLSetStmtAttr.c][925]
                    Exit:[SQL_SUCCESS]
    [ODBC][11041][1429005970.975291][SQLSetStmtAttr.c][265]
                    Entry:
                            Statement = 0x276ecb0
                            Attribute = SQL_ATTR_ROWS_FETCHED_PTR
                            Value = 0x26f5850
                            StrLen = -4
    [ODBC][11041][1429005970.975311][SQLSetStmtAttr.c][925]
                    Exit:[SQL_SUCCESS]
    [ODBC][11041][1429005970.975326][SQLBindCol.c][236]
                    Entry:
                            Statement = 0x276ecb0
                            Column Number = 1
                            Target Type = -28 SQL_C_UTINYINT
                            Target Value = 0x27f5af8
                            Buffer Length = 1
                            StrLen Or Ind = 0x27f5eb8
    [ODBC][11041][1429005970.975349][SQLBindCol.c][341]
                    Exit:[SQL_SUCCESS]
    [ODBC][11041][1429005970.975367][SQLFetch.c][162]
                    Entry:
                            Statement = 0x276ecb0
    [ODBC][11041][1429005970.975455][SQLFetch.c][348]
                    Exit:[SQL_ERROR]
                    DIAG [07006] [Informix][Informix ODBC Driver]Restricted data type attribute violation.
    [ODBC][11041][1429005970.975574][SQLGetDiagRec.c][758]
                   Entry:
                            Statement = 0x276ecb0
                            Rec Number = 1
                            SQLState = 0x7fffc3ff2e20
                            Native = 0x7fffc3ff2c14
                            Message Text = 0x7fffc3ff2c20
                            Buffer Length = 510
                            Text Len Ptr = 0x7fffc3ff2e70
    [ODBC][11041][1429005970.975615][SQLGetDiagRec.c][795]
                    Exit:[SQL_SUCCESS]
                            SQLState = 07006
                            Native = 0x7fffc3ff2c14 -> -11013
                            Message Text = [[Informix][Informix ODBC Driver]Restricted data type attribute violation.]
    [ODBC][11041][1429005970.975642][SQLGetDiagRec.c][758]
                    Entry:
                            Statement = 0x276ecb0
                            Rec Number = 2
                            SQLState = 0x7fffc3ff2e20
                            Native = 0x7fffc3ff2c14
                            Message Text = 0x7fffc3ff2c20
                         Message Text = 0x7fffc3ff2c20
                            Buffer Length = 510
                            Text Len Ptr = 0x7fffc3ff2e70
    [ODBC][11041][1429005970.975667][SQLGetDiagRec.c][795]
                    Exit:[SQL_NO_DATA]

    Here are my findings after consulting the unixODBC mailing list and the IBM documentation.
    There are several levels of data types at play here: native Informix SQL types, Informix ODBC driver SQL types and Informix ODBC driver C types (as well as standard C types).
    According to the Informix documentation (http://www-01.ibm.com/support/knowledgecenter/SSGU8G_11.70.0/com.ibm.odbc.doc/ids_odbc_108.htm), the ODBC driver SQL type for the native boolean type is SQL_BIT.
    The traces show that the ODBC SQL type is SQL_BIT (type code -7) and that this should be converted into the SQL_C_UTINYINT ODBC C type (type code -28).
    Oracle ODBC Gateway trace:
    DTY    NULL-OK  LEN  MAXBUFLEN  PR/SC  CST IND MOD NAME
    -7 BIT Y          1          1  0/  0    0  0  20 stat
    Performing delayed open.
    SQLBindCol: column 1, cdatatype: -28, bflsz: 1
    unixODBC trace:
    ODBC][11041][1429005970.975326][SQLBindCol.c][236]
                    Entry:
                            Statement = 0x276ecb0
                            Column Number = 1
                           Target Type = -28 SQL_C_UTINYINT
                            Target Value = 0x27f5af8
                            Buffer Length = 1
                            StrLen Or Ind = 0x27f5eb8
    [ODBC][11041][1429005970.975349][SQLBindCol.c][341]
    Oracle tries to bind the SQL_BIT type column to a buffer of SQL_C_UTINYINT type, which requires a conversion from SQL_BIT to SQL_C_UTINYINT  that is apparently not supported by the Informix ODBC Driver.
    According to the documentation (http://www-01.ibm.com/support/knowledgecenter/SSGU8G_11.70.0/com.ibm.odbc.doc/ids_odbc_108.htm) the Informix ODBC driver can only convert the SQL_BIT ODBC SQL type into SQL_C_BINARY, SQL_C_BIT and SQL_C_CHAR ODBC C types. (The ODBC C types are in turn converted into standard C types, for example the SQL_C_BIT type is converted into UCHAR which is a typedef for the standard C type unsigned char.)
    A possible workaround could be to tell Informix to present boolean as a different ODBC SQL type, for example SQL_CHAR (as it would be possible with PostgreSQL by setting BoolAsCharater=1 in odbc.ini), but Informix only seems to supports the SQL_BIT ODBC SQL type.
    A cumbersome workaround is to use the Gateway's pass-through feature that allows a query to be passed to Informix as is, which in turn allows us to cast the boolean field into a character field:
    SQL> set serveroutput on
    SQL> r
      1  DECLARE
      2    val  VARCHAR2(1);
      3    c    INTEGER;
      4    nr  INTEGER;
      5  BEGIN
      6    c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@informix;
      7    DBMS_HS_PASSTHROUGH.PARSE@informix(c,'select cast (stat as character) from bt');
      8    LOOP
      9    nr := DBMS_HS_PASSTHROUGH.FETCH_ROW@informix(c);
    10    EXIT WHEN nr = 0;
    11    DBMS_HS_PASSTHROUGH.GET_VALUE@informix(c, 1, val);
    12    DBMS_OUTPUT.PUT_LINE(val);
    13    END LOOP;
    14    DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@informix(c);
    15  END;
    16*
    t
    f
    PL/SQL procedure successfully completed
    Easier solutions are still welcome.

  • Unicode Migration - Password Problem

    Hello, friends.
    I've migrated an 7.6.06.03 instance to UNICODE, using db_migratecatalog.
    My original DBA password had 10 characters. After migration, I couldn't log into the new UNICODE version, neither through ODBC (unicode or not) nor with SQL Studio. But with dbmcli I was able to do a sql_connect with the old password and then change the DBA password to 9 chars. It's the new max password length, and I can't define a password greater than 9 chars.
    The problem is that our applications are configured with the 10 chars password, and it can't logon anymore.
    Is there a solution to this, or will I have to reconfigure my applications? (would be a pain... )
    Thanks!

    Hello Victor,
    yes there is a password length limitation:                            
    Passwords may not have more than 9 characters.                                                                               
    For more information please have a look at documentation at following link:    
    http://maxdb.sap.com/doc/7_6/default.htm                                                                               
    -> Basic Information -> Concepts of the Database System               
    -> Administration -> Users, Authentication and Authorizations         
    -> Conventions for User Names and Passwords   
    or http://maxdb.sap.com/doc/7_7/default.htm   
    -> Database Administration -> Managing Users               
    -> Conventions for User Names and Passwords         
    Thank you and best regards, Natalia Khlopina

  • ODBC problem caused by SQLGetInfoW function's data type abnormally output

    Background:We have designde a set of ODBC(Unicode) driver.We use Access2013x64 for data import operation according to the ODBC driver, which is called the
    SQLGetInfoW function.Because of the third parameter in SQLGetinfoW function outputing 8 bytes data in error,Access abnormally stop.While using Access2010x64,the same operation, the SQLGetInfoW funtion has also output 8 bytes of data and Access is normally
    end.
    Questions:
    We want to know for the operation of the third parameter'outputing data of SQLGetinfoW funtion,is there a difference between Access2013 and Access2010 ? And what
    is the specific difference?
    In addition, we also want to know the development on the ODBC what kind of standards should we followed? In other words,in the SQLGetInfoW function, the second
    parameter InfoType and the third parameter InfoValuePtr existence of the corresponding relationship in theory.
    We saw about the second parameter InfoType and the third parameter InfoValuePtr with the definition and the range of instructions in MSDN ODBC API Reference.
    We want to know the relation about the value of InfoType and the third parameter InfoValuePtr should return data's type.
    The function SQLGetInfoW statement as follows: 
    SQLRETURN SQLGetInfoW(
         SQLHDBC         ConnectionHandle,
         SQLUSMALLINT    InfoType,
         SQLPOINTER      InfoValuePtr,
         SQLSMALLINT     BufferLength,
         SQLSMALLINT *   StringLengthPtr);
    looking forward to your answer... 

    I think this is a very difficult question, but I really need to know the answer.I hope someone can help me.

  • Setting Up an ODBC Data Source in Windows XP for PostgreSQL Unicode

    Can someone help me setup an ODBC data source for a PostgreSQL Unicode database?
    1.  Under which tab(s) should I setup the Data Source:  User DSN, System DSN, File DSN?
    2.  The check boxes on Advanced Options Pages 1 and 2, which should be checked?
    I have Crystal Report XI, Windows XP, and PostgreSQL Unicode Version 08.1.0100.
    Thanks!
    Glynn

    Here it is, there is an issue with our Search functionality with the new SDN:
    Symptom
    When setting location on a Crystal Reports XI Report using the Progress OpenEdge ODBC Driver in Crystal Reports 2008 or Crystal Reports 2011 get “Some tables could not be replaced, as no match was found in the new data source.  Please specify the table required for any unmodified tables.”
    Environment
    Crystal Reports 2008 or 2011 
    Progress OpenEdge ODBC Driver
      Reproducing the Issue 
    Open a Crystal Report created in CR XI Report using the Progress OpenEdge ODBC Driver in Crystal Reports 2008 or 2011 
    Set location to a new ODBC Data Source 
    Get error "some tables could not be replaced, as no match was found in the new data source.  Please specify the table required for any unmodified tables.”
    Cause
    Crystal Reports XI only creates aliases for tables with special characters or duplicate names.
    Crystal Reports 2008 introduces a change which requires aliases for all tables.
    Aliases are not created when doing a Set Location on the whole data source.
    If a Customer has hundreds of reports they cannot set location of each table and fix the aliases.
    Resolution
    Upgrade to Crystal Reports 2011 Support Pack 02 or higher 
    Under registry key [HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\Database\ODBC] create string UseTableNameAsAlias and set it to PGPRO1019.DLL, PGOE1022.DLL. Registry file is attached.
      Keywords 
    Set Location 
    Progress ODBC 
    Crystal Reports 2008 2011

  • JDBC-ODBC Bridge does not support Unicode UTF-16

    Hi
    I'm using Jdeveloper 10.0.3 IDE in order to develop an application for data transformation between MS Access 2003 (source) and Oracle 10g (destination). Clients use Windows XP.
    JDBC-ODBC Bridge still does not support Unicode UTF-16 which is the Charest used by MS Access 2000/2003.
    Note that when I changed locale in regional setting, destination Connection to Ora10g failed to open a connection, it works only with English locale, so I can't change my locale information.
    How can I read Unicode from source DB?
    Any help would be appreciated. I look forward to see your response.
    Thanks,

    i also heared that JDBC-ODBC Bridge still does not support Unicode UTF-16,
    but i guess this is not in my case.That's the key in fact. JDBC-ODBC Bridge does not support UTF-16, which is the charset used by MS Access 2000/2003.
    or do i need to use a third party driver for jdbc odbc bridge?Free library at http://jackcess.sourceforge.net/
    Commerical JDBC driver at http://www.hxtt.com/access.html
    Yonghong Zhao
    System Analyst
    www.hxtt.com

  • Does JDBC/ODBC bridge support Unicode ?

    I'm importing data from an Access database and Unicoded characters dont shop up correctly, but as '?'.
    I assume that this is due to the ODBC driver, but just to rule other options out: Can the JDBC/ODBC bridge cause this ??

    http://forum.java.sun.com/thread.jsp?forum=48&thread=88681

  • ODBC Data Source Administrator (64-bit) crashes when I try to invoke PostgreSQL ANSI(x64) or Unicode(x64) drivers

    ODBC Data Source Administrator (64-bit) crashes with the following operation:
    1. Open 'ODBC Data Source Administrator (64-bit).
    2. Choose 'User DSN' tab
    3. Click 'Add' on right of windows. 'Create New Data Source' window opens
    4. Select driver 'PostgreSQL ANSI(x64)'
    5. Click 'Finish'
    6. Then get message 'ODBC Administrator has stopped working', with only option 'Close program'. A generic, unhelpful message is give: "A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available."
    Using the 32 bit ODBC Data Source Administrator and 32 bit driver there is no problem. I also had no problem with this under Windows 7 using the 64 bit drivers. What might cause this? Is there a way to debug and determine whether the driver is at fault or whether
    it's ODBC Data Source Administrator.
    Further information:
    This Windows 8 Enterprise 64 bit installation was an upgrade from Windows 7 Enterprise 64 bit.
    The PostgreSQL ANSI(x64) driver can be installed from: http://www.postgresql.org/ftp/odbc/versions/msi/
    I am using version 'psqlodbc_09_01_0200-x64'
    Please request any further information that might be useful.
    Regards,
    Tom.
    NB Reposted from   Windows 8 Hardware Compatibility forum. It's not really a hardware problem.

    Hi,
    This type issue should be more related to SQL product. You may post the issue on SQL forum.
    http://social.msdn.microsoft.com/Forums/en/category/sqlserver
    Kim Zhou
    TechNet Community Support

  • Hi, i am trying to open and view a report that comes from another server with different odbc connection

    hi, i am trying to open and view a report that comes from another server with different odbc connection
    i created a crystal report for a mysql database on my machine and everything works great
    but we have other reports that come from other machines with different odbc connection
    and this its not working when opens the report asks for credentials
    and i cannot use the remote ip for these reports that come from other machine
    question
    if i cannot connect to remote ip to open the report
    for each report i have to create a database the report database on my machine and then open the report ?
    or there is some other way to open the report ?
    i am using visual studio 2013 and mysql and
       <add key="MYSQLODBCDRIVER" value="{MySQL ODBC 5.3 UNICODE Driver}"/>
    thanks

    short
    i have a report that it was created on another server with a specific dsn
    now i am trying to open the report on my machine
    the database from the other server does not exist on my machine
    the server machine where the report was created the ip its not accessible
    question ?
    can i open the report on my machine or its impossible ?
    thanks

  • Connection to MySQL via ODBC not working

    Hello all together,
    I've got a problem with the ODBC connection to MySQL. The connection via ODBC is established and things like tnsping are working.
    When I select some data within the SQL*Plus environment, I get no real result. For example "select table_name from all_tables@mysql;" returns nothing.
    My entry in listener.ora:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME=odbc_mysql)
    (ORACLE_HOME=D:\oracle\product\11.0.1\db_1)
    (PROGRAM=dg4odbc)
    My entry in tnsnames.ora:
    MYSQL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA = (SID=odbc_mysql))
    (HS=OK)
    The initodbc_mysql.ora in ORACLE_HOME/hs/admin/:
    HS_FDS_CONNECT_INFO = odbc_mysql
    HS_AUTOREGISTER = TRUE
    HS_DB_NAME = hsodbc
    I tried some modifications but I still get no data from mysql database. When I try "select * from customer@mysql;" I get the correct number of records, the correct column names, but the content is always "¬¬¬¬". The odbc driver works, because with MS Access I can fetch the data. I'm using Oracle 11g Release 1 EE and MySQL ODBC 5.1.5.
    What could be the reason for this?
    Greetings,
    Joerg

    created in my UTF-8 Mysql DB your table and inserted a record; the select shows:
    SQL> select * from "movieclass"@mysql;
    idClass
    ClassName
    123
    H e l l o
    As you can see the content is there, the "space" between the letters is related to unicode. Each character is interpreted by 2 bytes and SQL*Plus wrongly displays both. Using iSQLPLus or SQLDeveloper does not show the "space" between the letters.
    Here the data type mapping:
    SQL> desc "movieclass"@mysql;
    Name Null? Type
    idClass NUMBER(3)
    ClassName NOT NULL NVARCHAR2(50)
    What's the exact version of DG4ODBC you're using? 11.1.0.7?
    According to the listener file you're using DG4ODBC on Windows. There was a high/low byte issue in DG4ODBC for Windows. This issue is fixed in 11.1.0.7 and a certain patch. So I recommend you to get first the 11.1.0.7 patchset (if you don't already have it installed):
    6890831 Oracle Database Family: Patchset
    11.1.0.7.0 PATCH SET FOR ORACLE DATABASE SERVER 11.1.0.7.0
    and then please apply also the latest patch:
    8689191 Oracle Database Family: Patch
    ORACLE 11G 11.1.0.7 PATCH 16 BUG FOR WINDOWS 32 BIT 11.1.0.7.0
    There was a high/low byte issue
    Edited by: kgronau on Aug 11, 2009 10:28 AM

  • Help, Cannot connect to ODBC database using SQL Toolkit!

    Hello All,
    I am toying around with the SQL Toolkit evaluation (2.2 + the patch) and I am having difficulty.
    I ran the example program "connect" and it seems to work fine.
    However, I try to write my own program and I keep getting the same message:
    "Function DBConnect: (return value == -10 [0xFFFFFFF6]).
    Native error code - 2147467259 0x80004005
    The message differs from time to time, but the return value is constant.
    I am using both Microsoft SQL Server 2012 and MySQL.
    For MySQL I have installed the latest ODBC connector, 5.3.4. Inside the Control Panel/Data Sources(ODBC), I have a DSN named test_mysql in both User DSN and System DSN.
    I ran a test on the connection and the test passes. I am not sure if I should use the ansi or unicode driver, I have tried both with the same success.
    I am not sure I had configured the SQL Server connection properly, and will attempt that again.
    My CVI Code is simple enough:
    hdbc = DBConnect ("DSN=test_mysql"); 
    Every time I get a -10 from DBConnect. Either I have something configured wrong or I am missing something.
    Does anyone have any suggestions?
    Veni Vidi Duci
    Solved!
    Go to Solution.

    Update 2:
    After getting off the phone with Tech Support the problem has been identified!
    LabWindows SQL toolkit requires 32 bit DNS. My PC is a 64 bit, so my DNS manager defaulted to 64 bit.
    I needed to use the 32 bit DNS manager when working with the toolkit.
    Once I created my DNS connections using the 32-bit version of the ODBC Datga Source manager, everything worked fine.
    See this tech note:
    http://digital.ni.com/public.nsf/allkb/E7984C0DA0F0E65086257694005B4CB7
    Veni Vidi Duci

  • Read Unicode string entry out of MS-Access though Java

    I'm making a small Finnish Dictionary programme use Java,so i first need to test if I can display those Unicoded Finnish words from Access to Java.
    Those words reads well from my FFF.mdb by Java,but when print out on the screen,some Unicode character display in question mark-??????,by the way,I can retrieve and display my query pretty well in Ms-Access,but now problems comes to Java.
    Before I print them on screen,do I need to add some filter on those unicoded finnish words after they be retrived form database,so that they can be displayed properly? thanX!
    =========
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conn2=DriverManager.getConnection("jdbc:odbc:FFF");
    Statement stmt2=conn2.createStatement();
    ResultSet rs=stmt2.executeQuery("Select * from fin_dictionary");
    while (rs.next()){
    //here,java can not display the finnish letters properly:
    System.out.println(rs.getString("words")+",");
    stmt2.close();
    conn2.close();
    }catch(Exception e){
    System.out.println("\n SQL Exception:"+ e.getMessage()+"\n");
    ===end===

    but also when I use Java's sql to instert unicode character in to the database,the character be inserted displayed in kind of "???" too. so I think there should be some method to make java handle those unicode properly.

  • A record selection problem with a string field when UNICODE database

    We used report files made by Crystal Reports 9 which access string fields
    (char / varchar2 type) of NON-UNICODE database tables.
    Now, our new product needs to deal with UNICODE database, therefore,
    we created another database schema changing table definition as below.
    (The table name and column name are not changed.)
        char type -> nchar type
        varchar2 type -> nvarchar2 type
    When we tried to access the above table, and output a report,
    the SQL statement created from the report seemed to be wrong.
    We confirmed the SQL statement using Oracle trace function.
        SELECT (abbr.) WHERE "XXXVIEW"."YYY"='123'.
    We think the above '123' should be N'123' because UNICODE string
    is stored in nchar / nvarchar2 type field.
    Question:
    How can we obtain the correct SQL statement in this case?
    Is there any option setting?
    FYI:
    The environment are as follows.
        Oracle version: 11.2.0
        ODBC version: 11.2.0.1
        National character set: AL16UTF16

    With further investigating, we found patterns that worked well.
    Worked well patters:
        Oracle version: 11.2.0
        ODBC version: 11.2.0.1
        National character set: AL16UTF16
        Report file made by Crystal Reports 2011
        Crystal Reports XI
    Not worked patters:
        Oracle version: 11.2.0 (same above)
        ODBC version: 11.2.0.1 (same above)
        National character set: AL16UTF16 (same above)
        Report file made by Crystal Reports 2011 (same above)
        Crystal Reports 2008 / 2011
    We think this phenomenon is degraded behavior of Crystal Reports 2008 / 2011.
    But we have to use the not worked patters.
    Anything wrong with us? Pls help.
    -Nobuhiko

  • Strugging with exporting data out from an Unicode database

    Background information
    Server: Sun Solaris 5.10; 10g
    Client: Windows 2000; 10g, TOAD, Oracle ODBC 10.2.0.1
    select * from v$NLS_PARAMETERS
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_CHARACTERSET AL32UTF8
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    We import SAS data (Windows Latin character set) into Oracle, use OWB for ETL, export the results to SAS. Per regulatory requirements, character columns cannot exceed 200 in length.
    Problem scenario
    Data that cause the trouble (200 characters, with a degree sign at the 77th position):
    XXX PT PRIOR TO MSFC NOT TO USE WALKER, PT STATED SHE NEEDED IT LAST VISIT 2° BAD HEADACHE DECREASED BALANCE, WHICH WAS LATER FOUND TO BE SINUS INFECTION. ASKED PT NOT TO USE WALKER THIS TIME, PT SAID
    Degree sign is U+00B0 in UTF-8, or 0xB0 (176) in ASCII. Though, I found out select ascii('°') from dual would return 49480 (or, 0xC2 0xB0).
    In order to accommodate the import, Source.COMMENTX is VARCHAR2(201). Using OWB, we are mapping this to Target.COVAL which is VARCHAR2(200).
    To get around ORA-12899: value too large for column, we use the expression convert(Source.COMMENTX, 'WE8ISO8859P1', 'AL32UTF8')).
    Although viewing Target.COVAL shows a ¿ (true in TOAD, SQL*Plus), dump(COVAL) confirms the 77th character is 176:
    DUMP(COVAL)
    Typ=1 Len=200: [...],32,50,176,32,[...]
    Desirable outcome
    Store and display the text in a VARCHAR2(200) column without compromising the high-bit ASCII characters, e.g., degree sign, micro sign (i.e., Greek character mu), copyright sign, etc.
    Questions
    1. Is it a wrong assumption that AL32UTF8 supports the high-bit ASCII characters (i.e., characters between 128 and 255)? If not, why do the clients display the inverted question mark instead of degree sign when executing select chr(176) from dual?
    2. The aforementioned DUMP statement seems to confirm ASCII 0xB0 (i.e., not 0xC2 0xB0, or 0xBF) is being stored in the database at the 77th position. Why do my applications via ODBC interpreted and replaced it as 0xBF, which is the inverted question mark?
    Avenues attempted without the desirable outcome
    1. Changing Target.COVAL from VARCHAR2(200) to NVARCHAR2(200) or VARCHAR2(200 CHAR) would make SAS (data access through ODBC) think the length is 400 or 800, respectively [Note: The vendor claims it is ODBC 3.0 compliant]
    2. Through Microsoft's ODBC Test software, this is the output for describe column all against select COLVAL from Target:
    icol, szColName, pcbColName, pfSqlType, pcbColDef, pibScale, *pfNullable
    1, COMMENTX, 8, SQL_WVARCHAR=-9, 200, 0, SQL_NULLABLE=1

    Degree sign is U+00B0 in UTF-8, or 0xB0 (176) in
    ASCII. Though, I found out select ascii('°') from
    dual would return 49480 (or, 0xC2 0xB0).Well, U+00B0 represents 'degree sign' in Unicode, and the UTF-8 encoded value for this code point is C2 B0. ASCII does not include a degree sign, and 176 is not a ASCII code value (only 0-127). The function ascii will just return the decimal form of the encoded value, in the character set of the database (not necessarily ASCII, or US7ASCII as it is called in Oracle).
    >
    To get around ORA-12899: value too large for column,
    we use the expression convert(Source.COMMENTX,
    'WE8ISO8859P1', 'AL32UTF8')).This part I don't understand. And where are you storing this? In the same AL32UTF8 database? I think this might be your problem.
    >
    Although viewing Target.COVAL shows a ¿ (true in
    TOAD, SQL*Plus), dump(COVAL) confirms the 77th
    character is 176:Yes, since 176 is an invalid value in UTF-8. U+0079 is encoded as 79, U+0080 is encoded as C2 80 - notice the "leap" there. If I would input 176 in a "utf-8 decode" I would get "out of range" or NaN back. Similarily, if you have managed to illegally store 176 as a character encoded value in a AL32UTF8 database, and are trying to retrieve that, involving a conversion to client character set, you would get the replacement character ¿ meaning "bad conversion".
    >
    DUMP(COVAL)
    Typ=1 Len=200: [...],32,50,176,32,[...]
    Try
    select chr(49480) from dual;
    - but you need to do this from a tool such as Oracle SQL Developer (it's free) that can handle Unicode ouput.

Maybe you are looking for