From: Jon T. <jon...@gm...> - 2008-02-18 21:52:57
|
Hi, there is some code in CVS in release 1.10 for _db2_module.c that hasn't been yet been merged into the current release that solves this problem. It hasn't been merged because there were several bugs in revision 1.10, so I've been rather slow about merging that code in. I'll try to get out a release tomorrow to fix this. Regards, Jón On Feb 18, 2008 6:46 PM, Jürgen Maier <Jue...@fl...> wrote: > Hi, > > I have following problem with calling stored procedures by using > function callproc: > It is only possible to call a Stored Procedure which has the same > database schema than the user from the DB2-connect-string, although the > user has the rights for executing the stored procedure > I tried to call the stored procedure with 'schema'.'storedProcedure', > but that didn't work. It throws exception: > _db2.Error: ('42884', -440, '[IBM][CLI Driver][DB2/NT64] SQL0440N No > authorized routine named "SCHEMA1.TESTPROC1" of type "PROCEDURE" having > compatible arguments was found. SQLSTATE=42884\r\n') > Strange is, that it is possible to call a StoredProcedure from a other > schema with the function execute and the parameters ('call > 'schema'.storedProcedure'). Unfortunately it is only possible to use > this function with IN parameters and not with INOUT and OUT parameter. > > > cn=DB2.connect('database','user','password') > cs=cn.cursor() > > params = None > > # is working (has the same schema than the user from the connect sting) > returnValue = cs.callproc('TESTPROC8',params) > print returnValue > > # is also working > cs.execute('call SCHEMA1.TESTPROC1(123)') > > # is not working > returnValue = cs.callproc('SCHEMA1.TESTPROC1',123) > print returnValue > > cn.commit() > cs.close() > cn.close() > > Thanks for your help, > Juergen > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > PyDB2-discuss mailing list > PyD...@li... > https://lists.sourceforge.net/lists/listinfo/pydb2-discuss > |