Re: A quote string exceeds 256 bytes
Posted in 2003
Jonathan Leffler <jleffler@earthlink.net> wrote in message news:<3F13A316.9000904@earthlink.net>... > 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, thank you very much for your help. What still confuses me is all the values were inserted through my ASP files. I designed the tables and the data type of that long value field is char(400). Anyway, I am going to add another field to let the two fields hold the long string. Thanks again Susan