[Zope-DB] Fwd: [egenix-support] Z-SQL crashes Zope -- mxODBC test
works --
but Z-SQL test fails ... for data longer than ~140 characters ...
(windows/interbase)
Charlie Clark
charlie at egenix.com
Wed May 5 03:56:53 EDT 2004
I'm forwarding this to the Zope-DB list as it looks more like a Zope problem
as an mxODBC one, at least at first sight. We will investigate it but
appreciate the comments of other Zopistas.
Regards
Charlie
On [egenix-support] Z-SQL crashes Zope -- mxODBC test works -- but Z-SQL test
fails ... for data longer than ~140 characters ... (windows/interbase) 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