[Zope] sql varchar truncated?
Scott Lewis
csl@balticave.com
Tue, 15 Jun 1999 06:28:28 -0500
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-->