[Zope-DB] Re: [egenix-support] Z-SQL crashes Zope -- mxODBC test works -- but Z-SQL test fails ... for data longer than ~140 characters ... (windows/interbase)

info at egenix.com info at egenix.com
Wed May 5 06:26:01 EDT 2004


Hi Jason,

it's very difficult to say much about this at the moment. Suffice it to say 
that Zope doesn't have an error when a field has more than 200 characters; I 
have just tested this with mxODBC and PostgreSQL.

It is, however, very strange that you have problems when using the DA and not 
when using the mxODBC directly. Are these the same versions? ie. are you 
using the same Python instance when testing?

We think that the problem is probably in the ODBC driver but the traceback 
was cut off; we recently had a similar issue with BLOBs and the embedded 
Nexus (Delphi) database. Could you please provide the entire Windows error 
message.

We'd like to set up a compatible system to run some tests. What version of 
Interbase and the ODBC are you running. Would it be possible to give us the 
schema and some sample data?

Thanks

Charlie Clark

On 2004-05-05 at 03:42:25 [+0200], Jason LeMonier wrote:
> Hey,
> 
> Using eGenix mxODBC Database Connection at  /db_bos
>         select * from t20_user_experience
>                 --> retrieves 2 rows -- 1 field has 200+ characters
> 
> Z-SQL method using SAME db connection: /db_bos
>         select uid from t20_user_experience     (ok)
>         select * from t20_user_experience
>                 --> python.exe - Application Error -- instruction at 0x...  
>                 Ok to term, Cancel to Debug.
>                         Debug (Vis Studio): Runtime error -- abnormal 
>                         program execution.
> 
> Bottom Line:
>         Z-SQL method crashes Zope when a field has 200+ characters in it!
> 
> Progress:
>         This problem started when I was trying to update fields w/  ~200+ 
>         characters using Z-SQL methods.
>         I bypassed Z-SQL updates completely by running updates like this:
>             def run_sql (sql, dsn):
>                 """ bypass z-sql ??? """
>                 import mx.ODBC.Windows      # Connect to the database 
>                 (using iODBC)
>                 conn = mx.ODBC.Windows.DriverConnect('DSN=%s'%(dsn))
>                 curs = conn.cursor()     # Create a database cursor
>                 curs.execute(sql)           # Execute a statement on the 
>                 cursor
>                 conn.commit()
>                 curs.close()
>                 conn.close()
>                 # return "run_sql output: dsn=%s sql=%s "%(dsn,sql)
>                 return 1
>         Only to find the same data crashes zope upon reading the data into 
>         a resultset!
> 
> 
> I've been looking in: \python\Shared\DC\ZRDB at dbi_db.py and others to try 
> and track down
> what code is running for Z-SQL.
>     in dby_db.py --> def query(self,query_string, max_rows=9999999):
>                                         return 'stop now!!'     # This did 
>                                         NOT change anything!!  what code is 
>                                         running???
> 
> Any help with:
>         finding the code that runs to execute Z-SQL
>         bypassing Z-SQL selects but still get the needed resultsets
>     General tips on what may be happening
>     
>     would be so greatly appreciated!!
>       
> ----------------------------------------------------------------------------
> -
> Environment: Plone 1.0.5, Zope 2.6.1, W2K Server, Interbase 6
> ----------------------------------------------------------------------------
> -
> 
> 
> 
> please let me know if you have any questions!
> 
> Jason LeMonier
> Software Engineer
> Retail Technologies International
> Office   916.605.7262
> Mobile  415.595.0969
> Fax      509.693.4243
> jlemonier at RetailPro.com
-- 
Charlie Clark
eGenix.com

Professional Python Services directly from the Source
 >>> 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