[egenix-users] Problem calling a stored procedure that returns a resultset

Donnie Woodruff dwoodruff at nngov.com
Thu Jul 22 16:19:09 CEST 2004


I added the following:
                 define_macros=[('unixODBC', None),
                                 ('DONT_REPORT_WARNINGS', None)],
and recompiled using "python setup.py install" but am still receiving 
the same error.  Am I supposed to do something else? 

Is the message a "warning message" or an "error message"?

mxODBC.InterfaceError: ('0100C', 466, '[unixODBC][StarSQL][StarSQL CLI 
Driver][DB2]CALL PROCEDURE RETURNED ONE OR MORE QUERY RESULT SETS.', 4612) 

Thanks for the quick response.
Donnie



M.-A. Lemburg wrote:

> Donnie Woodruff wrote:
>
>> I am trying to call a stored procedure that returns a single result 
>> set using the following code on Python 2.3 and mxODBC installed using 
>> distutils on Debian:
>>  from mx.ODBC.unixODBC import DriverConnect as DB2
>>  conn = DB2('DSN=DB2D;UID=xxxxxx;PWD=xxxxxx')
>>  cur = conn.cursor()
>>  cur.execute("{call FINA.PRQSSP01}")
>>  #cur.execute("select * from sysibm.sysdummy1")
>>  print cur.fetchall()
>>  cur.close()
>>  conn.close()
>>
>> I receive the following message:
>> Traceback (most recent call last):
>>  File "callstored.py", line 5, in ?
>>    cur.execute("{call FINA.PRQSSP01}")
>> mxODBC.InterfaceError: ('0100C', 466, '[unixODBC][StarSQL][StarSQL 
>> CLI Driver][DB2]CALL PROCEDURE RETURNED ONE OR MORE QUERY RESULT 
>> SETS.', 4612)
>>
>> I know the unixODBC and StarSQL drivers are working when calling a 
>> stored procedure with a resultset because when I call this same 
>> stored procedure via isql it works just fine.
>>
>> Does anyone have any suggestions?
>
>
> You need to recompile mxODBC using the DONT_REPORT_WARNINGS
> compile time switch. Edit mxCOMMERCIAL.py to add this macro definition:
>
>
>                  define_macros=[('unixODBC', None),
>                                  ('DONT_REPORT_WARNINGS', None)],
>
>> One other note -- if we run the same code on Windows changing the 
>> import statement to:
>>  from mx.ODBC.Windows import DriverConnect as DB2
>> the program works just fine.
>>
>> Thanks for the help!
>> Donnie
>
>



More information about the egenix-users mailing list