OracleType.NVarChar parameters handled differently in framework 1.1?

From: SmokeMe (smokemeakipper_at_ntlworld.com)
Date: 05/12/04


Date: Wed, 12 May 2004 18:33:00 +0100

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.



Relevant Pages

  • Re: Oracle NULL vs revisited
    ... On Aug 17, 2:44 pm, "David Portas" ... string values supported by Oracle is not equivalent to the domain of string ... anywhere except Oracle. ... I don't agree that a string consisting of zero characters IS a value. ...
    (comp.databases.oracle.server)
  • Re: Oracle NULL vs revisited
    ... string values supported by Oracle is not equivalent to the domain of ... anywhere except Oracle. ... I don't agree that a string consisting of zero characters IS a value. ... Only if "" carries some meaning. ...
    (comp.databases.oracle.server)
  • Question about Oracle JDBC setFormOfUse for storing NLS data
    ... I am doing this because, Oracle, in the JDBC Application Developer's ... if you bind or define a Java string for a column of SQL ... What is happening is that till a Java String of 2000 characters, ...
    (comp.databases.oracle.misc)
  • OracleClient stored procedure parameter - can it handle 8 bit VarChars?
    ... encrypt/decrypt a character string using Oracle's obfuscation package. ... The database is Oracle 9i, running with an eight bit character set, but I ... that I expect 8 bit characters back from Oracle. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Prothon should not borrow Python strings!
    ... """It does not make sense to have a string without knowing what encoding ... same cul de sac as Python. ... Prothon_String_As_ASCII // raises error if there are high characters ... Python's split between byte strings and Unicode strings is ...
    (comp.lang.python)