[Zope-DB] MaxDB Problems - Pls Help

Samir Mishra SamirMishra at cbuae.gov.ae
Wed Jan 14 00:06:03 EST 2004


UPDATE -

I ran the problem queries through a number of tools and I believe the
problem is within the Sapdb module for Python. So Dieter is correct in
saying it's not a Zope issue.

Also, the following queries fail - 
1. select BANKBIC, BANKNAME, BANKTYPE from BANKINFO
   where ( BANKBIC in ('ADCB') ) 

2. select BANKBIC, BANKNAME, BANKTYPE from BANKINFO
   where ( BANKBIC = 'ADCB' ) 

___BUT___ as a workaround, I'm using -
1. select BANKBIC, BANKNAME, BANKTYPE from BANKINFO
   where ( BANKBIC in ('ADCB', '++++') ) 

where '++++' can be any dummy non-existent value. And this gives me the
resultset I'm expecting. 

I thought I'd post this just in case someone else encounters a similar
problem. I'd prefer a fix though. It took me all day to track down the
problem and only a little less time to find the solution. It's taken up too
much of my time, I just can't spare any more to follow up Dieter's
suggestion, so for now tracing the log is out.

Samir.





-----Original Message-----
From: Dieter Maurer [mailto:dieter at handshake.de]
Sent: Tuesday, January 13, 2004 22:44
To: Samir Mishra
Cc: zope-db at zope.org
Subject: Re: [Zope-DB] MaxDB Problems - Pls Help


Samir Mishra wrote at 2004-1-13 08:43 +0400:
> ...
>I'm using MaxDB with Zope 2.6.1 (binary release, python 2.1, win32-x86),
>python 2.1.3, win32), ZsapdbDA 0.3 and latest SAPDB Python modules.
> ...
>6. select BANKBIC, BANKNAME, BANKTYPE from BANKINFO
>   where ( BANKBIC in ('ADCB', 'NBAD') ) 
>
>The last query gives me 2 records, one for each code, which is the primary
>key on the table.
>
>
>
>Now for the problem part -- the following queries are failing to return any
>records --
>
>1. select BANKBIC, BANKNAME, BANKTYPE from BANKINFO
>   where ( BANKBIC in ('ADCB') ) 
>
>2. select BANKBIC, BANKNAME, BANKTYPE from BANKINFO
>   where ( BANKBIC = 'NBAD' ) 
>
>I get the message "There was no data matching this Z sapdb Database
>Connection (connected) query." Which I know is not true.

For me, it looks as if it were not a Zope issue.

To find out for sure who is responsible, I would
add logging to "ZsapdbDA" (usually the "query" method in "db.py")
to learn what SQL Zope sends to the database and what
the database returns.

-- 
Dieter



More information about the Zope-DB mailing list