Inserting Decimal/Float Data Using the Array Interface and Binding the Type as ORATYPE_NUMBER Using a Comma as the Decimal Separator will Result in Either Data Corruption or Invalid Number

(Doc ID 780644.1)

Last updated on SEPTEMBER 17, 2010

Applies to:

Oracle Objects for OLE - Version: to - Release: 9.2 to
Microsoft Windows (32-bit)
Microsoft Windows Server 2003


Inserting decimal/float data using the array interface binding the type as ORATYPE_NUMBER and setting the regional settings so that a comma is used as the decimal separator will result in either Data Corruption or Invalid Number. Data corruption will occur in 10gr2 and inavlid number will be reported in 11g.

The following simple testcase reproduces the bug when the regional settings are French Canadian.

create table testfloat (pk number, float1 float);

Set OO4OSession = CreateObject("OracleInProcServer.XOraSession")
Set OraDb = OO4OSession.OpenDatabase("V102", "scott/tiger", 0)
OraDb.Parameters.AddTable "PK", ORAPARM_INPUT, ORATYPE_NUMBER, 2, 22
OraDb.Parameters.AddTable "FLOAT1", ORAPARM_INPUT, ORATYPE_NUMBER, 2, 22
Set PkArray = OraDb.Parameters("PK")
Set Float1Array = OraDb.Parameters("FLOAT1")
PkArray(0) = 3
PkArray(1) = 4
Float1Array(0) = 0.992
Float1Array(1) = 0.552

SQL> select * from testfloat;

---------- ----------
3 0
4 0



Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms