PRB: Error "String Literal Too Long" using Update or Insert on Oracle Table (233515)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
This article was previously published under Q233515 SYMPTOMS
When using the "Microsoft OLE DB Provider for Oracle" to Execute an action query (Update or Insert) on a connection opened to an Oracle 7 or 8 server and a table that has LONG datatype field, you might receive the following error message:
ORA-01704: String literal too long
If using the "Microsoft OLE DB Provider for ODBC Drivers," the error message might look like:
[Microsoft][ODBC driver for Oracle][Oracle] ORA-01704: String literal too long.
CAUSE
There is an Oracle limitation of 2000 characters for literal strings on all flavors of Oracle 7 and 4000 characters on Oracle 8.
RESOLUTION
Use a string literal of up to 2000 or 4000 characters only. Longer values might only be entered using straight code to edit or add new records.
STATUS
This behavior is by design.
REFERENCES
For additional information about LONG character datatypes and how to deal with them using Visual Basic, please see the following
article in the Microsoft Knowledge Base:
178875 FILE: ORALONG.EXE: Use RDO with Oracle LONG/LONG RAW Datatypes
For additional information about on how to use ADO with Oracle, please see the following
article in the Microsoft Knowledge Base:
176936 INFO: Visual Basic 5.0 Accessing an Oracle Database Using ADO
Modification Type: | Major | Last Reviewed: | 5/7/2001 |
---|
Keywords: | kbDriver kbDSupport kbOracle kbprb KB233515 |
---|
|