S
SmokeMe
There appears to have been a change in behaviour between handling of
OracleType.NVarChar parameters in 1.1? In my case this breaks code using
DbType.String or the IDataParameter interface with strings over 2000
characters.
A 2001 character string parameter, consisting entirely of 7 bit characters,
sent to a 9.2.0.1 stored procedure works under the optional 1.0 Oracle
driver. The exact same code and database now falls over with
"ORA-01460:unimplemented or unreasonable conversion requested" using the
supplied 1.1 OracleClient.dll.
This change in behavior leads me to the conclusion that the biggest string
you can now pass to an Oracle database using the
IDataParameter interface is now only 2000 characters, primarily because
OracleClient 1.1 maps the String native type to OracleType.NVarChar with a
4000 byte limit?
This 2000 char limit would be required to handle the possibility that the
database *may* be configured with a 16bit NLS_NCHAR_CHARACTERSET like
AL16UTF16 as is sometimes recommended by Oracle? Even though you are could
actually be inserting a plain old ascii string into a plain old
varchar2(4000)
column on a plain old USASCII7 Oracle instance?
Assuming this is the case, can anyone think of a workaround, other than
1. Having to abandon the database independent IDataParameter interface and
change all the client code to discover and use whichever native
<database>Type is appropriate for the connection?
2. Stick to strings of less than 2000 characters.
Rich.
OracleType.NVarChar parameters in 1.1? In my case this breaks code using
DbType.String or the IDataParameter interface with strings over 2000
characters.
A 2001 character string parameter, consisting entirely of 7 bit characters,
sent to a 9.2.0.1 stored procedure works under the optional 1.0 Oracle
driver. The exact same code and database now falls over with
"ORA-01460:unimplemented or unreasonable conversion requested" using the
supplied 1.1 OracleClient.dll.
This change in behavior leads me to the conclusion that the biggest string
you can now pass to an Oracle database using the
IDataParameter interface is now only 2000 characters, primarily because
OracleClient 1.1 maps the String native type to OracleType.NVarChar with a
4000 byte limit?
This 2000 char limit would be required to handle the possibility that the
database *may* be configured with a 16bit NLS_NCHAR_CHARACTERSET like
AL16UTF16 as is sometimes recommended by Oracle? Even though you are could
actually be inserting a plain old ascii string into a plain old
varchar2(4000)
column on a plain old USASCII7 Oracle instance?
Assuming this is the case, can anyone think of a workaround, other than
1. Having to abandon the database independent IDataParameter interface and
change all the client code to discover and use whichever native
<database>Type is appropriate for the connection?
2. Stick to strings of less than 2000 characters.
Rich.