Services Partners Company
Knowledge Base


Article

Error 7682 when referencing a CLOB or BLOB field in a SQL-92 statement

« Go Back

Information

 
EnvironmentUsing a static SQL statement to INSERT or UPDATE a CLOB / BLOB field
Using a static SQL statement to SELECT data and referencing a CLOB / BLOB field in the WHERE, GROUP BY or ORDER BY clause
OpenEdge 10.0x
OpenEdge 10.1x
Ope
???nEdge 10.2
Question/Problem Description
Error 7682 when referencing a CLOB or BLOB field in a SQL-92 statement
Error 7682 when inserting or updating a CLOB / LVARCHAR field
Error 7682 when inserting or updating a BLOB / LVARBINARY field
Error 7682 when referencing a CLOB / BLOB field in a WHERE, GROUP BY or ORDER BY clause in a SELECT statement
Invalid long datatype column reference (7682)
[DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OpenEdge]Internal error 2 (A buffer other than the NLS system handle memory was not large enough) in SQL from subsystem NLS SERVICES function nls_conversion_t::convert_buffer called from clob_info_t::putOptimizeBuffer on . for .
Steps to Reproduce
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
Currently for both ODBC and JDBC applications, the values for CLOB (LVARCHAR) and BLOB (LVARBINARY) columns cannot be put directly into the INSERT or UPDATE SQL statements.
Furthermore, OpenEdge SQL-92 does not support CLOB/BLOB references in a predicate (with 1 exception), function, arithmetic operator, or comparison operator. It is possible to reference a CLOB / BLOB with the IS [NOT] NULL predicate. In addition, it is not possible to use a CLOB/BLOB column as an ORDER BY or GROUP BY key.
Resolution
Use a Prepared Statement to INSERT or UPDATE values for a CLOB or BLOB field as a parameter.
The following is a JDBC example for a CLOB field:

PreparedStatement pstmt = connection.prepareStatement("INSERT INTO Test (XML) VALUES (?)");
String xml = "<Tag>MyData</Tag>";
StringReader sr = new StringReader(xml);
pstmt.setCharacterStream(1,sr,xml.length());
pstmt.executeUpdate();
pstmt.close();
Workaround
Notes
Attachment 
Disclaimer

The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.



Feedback
 
Was this article helpful?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful.



Characters Remaining: 255