hi, i'm having a little problem that i hope someone might have some insight on. i'm using Zope with MS SQL Server 7.0, via the ODBC database adapter. i have a database field called 'description', which is a varchar of length 500. when i write and read back a value via SQL methods, the description string is truncated to about 250 characters. it looks like MS SQL is receiving the full string. if i try to write more than 500 chars, i get a SQL error. if i write less than 500, i get no error. but when i read back the string via a select SQL method, i only get back ~250 characters. i can't verify at the moment what's in the database- i'm FAR away. i've got an email to the DBA to check it out, but i was hoping somewhere here might have an idea of the problem. is a string variable limited to 256 chars in python or zope? i tested the SQL methods directly from zope, to insure that something wasn't happening with HTTP. thanks in advance for any help, -scott included below are the contents of the the two SQL methods (pretty straightforward...): the write method: insert into tblTrainingEvent (Title, Statewide, AreaID, description) values ('', 1, 1,<!--#sqlvar description type=string-->) the read method: select description from tblTrainingEvent where <!--#sqltest id column=ID type=int-->
If I recall the varchar type is limited in size (256 chars?) and the "text" (MsSQL?) or "memo" (Access?) type is what is used for large text lengths.
participants (2)
-
Larry Luther -
Scott Lewis