Samir Mishra wrote:

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.

First, let's try to put the blame on the kernel. Clients don't change the SQL (mostly), but connect options sometimes introduce suptle diffenreces in how the SQl is interpreted by the kernel.


1. in sapdb/dbapi.py, go to class Connection, def __init__. Replace 'genericResults=true' with 'component=ODB&genericResults=true'. This put the Python driver into ODBC, which is also used by SQLStudio.

2. in class Cursor, def execute: replace 'if parameters == None:' with 'if parameters == "garbage":'. Statements are then always prepared, which mimics also more closely SQLStudio.

Neither change is really a fix, but could help us detect the real bug.

If neither replacement changes anything, then it must be a bug in the Python driver. It would be really helpful if you could send me the data of BANKINFO, or a subset that is enough to reproduce the problem.

If the data is too large or too confidential, it might also be helpful to remove the comment signs in def wrapCall and send me the resulting trace (both from a working query and a faulty one). '# call, args' must be replaced by 'print call, args'You'll have to start Zope from the command line and redirect the output to a file. Or you could open a file before def wrapCall and change the print to a openFile.write ().

Daniel Dittmar

--
Daniel Dittmar
SAP Labs Berlin
[EMAIL PROTECTED]



--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to