What is the longest value I can bind?
The old behavior was incorrect. See bug 4322830. The old behavior was to construct a Timestamp that would print the same value as the database value. But since Timestamp is in the UTC time zone this would give a Timestamp value that was offset from the correct value. 8:00am January 1, 2007 UTC is not the same as 8:00am January 1, 2007 PST. They represent different points in time. If you read 8:00am January 1, 2007 PST in the database, the 9i and 10g drivers would construct a Timestamp with the value 8:00am January 1, 2007 UTC. This value would print “correctly”, that is it would print as “8:00am January 1, 2007”, but it obviously represented the wrong instant in time. The 11.1 drivers fix this bug.
MethodColumn TypeMaximum lengthsetBytesLONG4k bytessetBytesLONG RAW2G bytessetStringLONG32k chars (SetBigStringTryClob=”false”) 4k chars (SetBigStringTryClob=”true”)setStringCLOB2G charsIn 9.2, setString() on a LONG can insert up to 64k characters with the OCI driver, and 4k characters with the Thin driver. In 10.1.0 we changed the limit for both drivers to 32k characters. We understand that reducing the limit for OCI from 64k to 32k may be a problem to some customers. However, considering the substantial performance improvement that this change made possible, and that Oracle is strongly recommending our customers to migrate from LONG to CLOB, we decided that the architectural change is necessary.We recommend customers who need setString() to work over 32k characters to migrate from LONG to CLOB.Back to TopAdvanced Data Types (Objects)Your question here.