[Zope-DB] [egenix-info] RE: [egenix-support] Z-SQL crashes Zope -- eGenix saved the day!!!

Jason LeMonier jlemonier at Retailpro.com
Wed May 5 13:32:48 EDT 2004


Hi Charlie,

My Z-SQL method was aquiring an unknown copy of the Z-ODBC connection, 
instead of the mxODBC connection!!!
Your driver works 100%, and resolves this huge problem for us!!

W2k Server, Interbase 6, EasySoft Driver 
	With Zope's standard: Z-ODBC connection:	
		--> select * from table (when any field has 140+/200+ characters in it)
		--> CRASHES Zope!!  horrible

Your mxODBC driver solves this problem entirely!!

thank you!!!

(we'll be purchasing one or two licenses today or tomorrow!!)



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



-----Original Message-----
From: info at egenix.com [mailto:info at egenix.com]
Sent: Wednesday, May 05, 2004 3:26 AM
To: Jason LeMonier
Cc: support at egenix.com; zope-db at zope.org
Subject: Re: [egenix-support] Z-SQL crashes Zope -- mxODBC test works --
but Z-SQL test fails ... for data longer than ~140 characters ...
(windows/interbase)


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



More information about the Zope-DB mailing list