Your query may not return rows that contain Cyrillic characters when you use the Oracle 8.1.7 client code page that has Windows Code Page 1251 8-bit Latin/Cyrillic (CL8MSWIN1251) in the .NET Framework 1.0 (892609)



The information in this article applies to:

  • Microsoft .NET Framework 1.0

SYMPTOMS

When you use an Oracle 8.1.7 client together with an Oracle 8.1.7 server, your query may not return rows that contain Cyrillic characters. This problem occurs when the following conditions are true:
  • The code page has Microsoft Windows Code Page 1251 8-bit Latin/Cyrillic (CL8MSWIN1251).
  • You use the Microsoft .NET Managed Provider for Oracle version 1.0 with the Microsoft .NET Framework 1.0.
When you try to query the data in the database, you may receive the following error message:
Index out of range exception

CAUSE

This problem occurs because the .NET Managed Provider for Oracle version 1.0 does not use UCS2 binding. Therefore, the .NET Managed Provider for Oracle version 1.0 expects UTF-8 characters from Oracle.

RESOLUTION

To resolve this problem, you can use one of the following methods:
  • Use the UTF-8 character set on the Oracle server.
  • Upgrade to the .NET Framework 1.1.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

Steps to reproduce the problem

  1. Create an Oracle 8.1.7 database. Use Windows Code Page 1251 8-bit Latin/Cyrillic (CL8MSWIN1251) to do this.
  2. Put the data in Oracle by using the following script:
    The following script puts the data in Oracle: 
    drop table TestChar; 
    commit;  
    create table TestChar (MyChar NVARCHAR2(1));
    delete from TestChar;
    Insert into TestChar values(chr(228 using NCHAR_CS));  
    insert into TestChar values(chr(253 using NCHAR_CS));  
    commit;  
    select * from TestChar;  
    select ascii(MyChar) from TestChar;  
    
  3. Query the data from the Oracle database. Use the Oracle 8.1.7 client and the .NET Framework 1.0 with the Web release of the .NET Managed Provider for Oracle version 1.0.

    When you try to access the data in the table, you receive the error message that is mentioned in the "Symptoms" section.

Modification Type:MajorLast Reviewed:3/7/2005
Keywords:kbOracle kbADONET kbDatabase kbtshoot kbprb KB892609 kbAudDeveloper