(BILLING.subscriber_balance, subid,
balance))
print res.context.callproc_result
Michael Bayer wrote:
On Mar 21, 2010, at 9:33 PM, Kevin Wormington wrote:
As a test I altered the compile_procedure and the call to cursor.callproc and do get the
values back from the stored procedure from the print res
Michael Bayer wrote:
On Mar 22, 2010, at 3:48 PM, Kevin Wormington wrote:
That's getting closer. Now if I could just figure out how to get it to use the
parameters that I'm actually passing in engine.execute. It appears ibm_db_sa botches the
sql (to CALL BILLING.subscriber_balance
Michael Bayer wrote:
On Mar 21, 2010, at 12:50 PM, Kevin Wormington wrote:
Hi,
I am using SQLAlchemy 0.5.8 with the ibm_db_sa (DB2) adapter and I am wanting
to add simple session.callproc support so that I can get results from stored
procedures that don't use a select or table format. I
):
return %s(%s) % (element.name, ,.join(str(expr) for expr in
element.args))
Kevin Wormington wrote:
Michael Bayer wrote:
On Mar 21, 2010, at 12:50 PM, Kevin Wormington wrote:
Hi,
I am using SQLAlchemy 0.5.8 with the ibm_db_sa (DB2) adapter and I am
wanting to add simple session.callproc
Please disregard...cut paste messed up the indention.
Kevin Wormington wrote:
I get the following when trying the example implemention:
Traceback (most recent call last):
File test.py, line 6, in module
class procedure(ClauseElement):
File test.py, line 15, in procedure
@compiles
After fixing my cutpaste problem I just get DB2 sql errors from the
sample code. I'm going to turn on some more logging in db2 and see what
is actually reaching it.
Kevin
Matthew wrote:
I got around this by switching to declarative and declaring my
property like this:
_id =
,
Kevin
Michael Bayer wrote:
On Mar 21, 2010, at 12:50 PM, Kevin Wormington wrote:
Hi,
I am using SQLAlchemy 0.5.8 with the ibm_db_sa (DB2) adapter and I am wanting
to add simple session.callproc support so that I can get results from stored
procedures that don't use a select or table format
Michael Bayer wrote:
On Mar 21, 2010, at 5:44 PM, Kevin Wormington wrote:
I have tried several different ways of getting plain execute to work including via the low-level ibm_db.execute interface with no luck. I have also tried changing the DB2 side to be a function instead of a stored
arguments. Just not sure how to fix it.
Michael Bayer wrote:
On Mar 21, 2010, at 7:34 PM, Kevin Wormington wrote:
From DB2 logs it appears that the following is what's getting sent to DB2 and
resulting in the error:
CALL BILLING.subscriber_balance(1000,?)( )
This is using:
print
there are
any arguments. Just not sure how to fix it.
Michael Bayer wrote:
On Mar 21, 2010, at 7:34 PM, Kevin Wormington wrote:
From DB2 logs it appears that the following is what's getting sent to
DB2 and resulting in the error:
CALL BILLING.subscriber_balance(1000,?)( )
This is using
operation.
Kevin Wormington wrote:
I just modified the compile to return just the procedure name and the
cursor.callproc to send the statement and the two parameters as a tuple
and the DB2 receives the correct SQL:
CALL BILLING.subscriber_balance(?,?)
But I get the following back from ibm_db_dbi
) to actually have the (subid,balance) in the parameters?
Kevin
Michael Bayer wrote:
On Mar 21, 2010, at 8:07 PM, Kevin Wormington wrote:
I just modified the compile to return just the procedure name and the
cursor.callproc to send the statement and the two parameters as a tuple and the
DB2 receives
, parameters, context)
Kevin Wormington wrote:
I was able to get it working from just the ibm_db_dbi interface - the
actual call has to be:
cursor.callproc('BILLING.subscriber_balance',(subid,balance))
these both cause the sql errors:
cursor.callproc('BILLING.subscriber_balance',(1000,0
13 matches
Mail list logo