A quote string exceeds 256 bytes
Posted in 2003
Topics: Connectivity: ODBC / JDBC / .NET
Hi I use ODBC to connect database (Informix SQL-version 7.20.UD6 ) for my asp files. when save data with a long value, say, more than 300 characters, some time the error "A quote string exceeds 256 bytes" happens. But when check the existing values for the field, some of them have got values with length of more than 300. Which means we do can save a long string, but why that error happens some times?? I have been very confused by this problem, can somebody please help me? Many thanks in advance. Susan
Taamial wrote: > I use ODBC to connect database (Informix SQL-version 7.20.UD6 ) for my > asp files. when save data with a long value, say, more than 300 > characters, some time the error "A quote string exceeds 256 bytes" > happens. > > But when check the existing values for the field, some of them have > got values with length of more than 300. Which means we do can save a > long string, but why that error happens some times?? > > I have been very confused by this problem, can somebody please help > me? If you write INSERT INTO SomeTable VALUES("..."); then in the version you have, you get an error when the string is longer than 256 characters. In some more recent server/CSDK (ODBC) versions, that limit has been lifted (95% confident). If you use host variables and the notation INSERT INTO SomeTable VALUES(?) and supply a long value as the host variable, your upper limit increases to 32 KB minus a few bytes. That's how the long strings get inserted successfully. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/