[Zope-DB] ZODBCDA problem.

M.-A. Lemburg mal at egenix.com
Thu Dec 9 05:18:02 EST 2004


Ed Kellogg wrote:
> Hi all,
>   I am having a problem the ZODBCDA connector. Have the query set up
> correctly and it worked fine in the ZSQL Method however when it runs I
> get
>  
>  Error Type: sql.error
> Error Value: ('22001', 8152, '[Microsoft][ODBC SQL Server Driver][SQL
> Server]String or binary data would be truncated.') . 
>  
> the insert statement is as follows 
>  
> Insert into status (status) value(<dtml-sqlvar status=string>)
>  
>  I am fairly new to Zope and is there a truncation issue with this
> driver or maybe I am not preparing the statement correctly before
> executing  it would help. I have scoured the net looking for an answer
> on this issue. 
>  
> I am using Zope 2.6.4 and ZODBCDA 3.1.2b2 for python v 2.1
>  
> Any help would be appreciated.  

This could have two reasons:

* the string you are trying to insert is longer than the column
   in the database

* the ZODBCDA is truncating the data in some way

You could try our mxODBC Zope DA to see whether the second
option is the cause.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Dec 07 2004)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::


More information about the Zope-DB mailing list