Re: SQL Server stored prcedures with output parameters
From: Steve Holden (steve_at_holdenweb.com)
Date: 11/20/04
- Next message: Charles Allen: "Re: Microsoft Patents 'IsNot'"
- Previous message: Terry Reedy: "Re: Microsoft Patents 'IsNot'"
- In reply to: logistix at cathoderaymission.net: "Re: SQL Server stored prcedures with output parameters"
- Next in thread: Steve Holden: "Re: SQL Server stored prcedures with output parameters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 19 Nov 2004 21:09:45 -0500
logistix at cathoderaymission.net wrote:
>>Well, in ADO you'd normally create a command object and then do
>>something like
>>
>>objCmnd.Parameters.Append.CreateParameter("@link_id", &
>> adInteger, adParamOutput, , 0)
>>
>>Unfortunately as far as I can see the DB API docs are silent on how to
>>distinguish the output parameters to a callproc(), contenting itself
>>with saying """The result of the call is returned as modified copy of
>>the input sequence. Input parameters are left untouched, output and
>>input/output parameters replaced with possibly new values."""
>>
>
>
> You need to create the parameter seperately so you get a reference to
> it. My ADO is a little rusty, but it's something like:
>
> outparam = win32com.client.Dispatch("ADODB.Paramter")
> # set param here instead of function
> objCmd.Parameters.Append(outparam)
>
> Then you can access outparam after executing the stored proc.
Erm, I was trying to be DB API compatible in Python, so the ADO stuff
was just a response to Tim Golden's comments.
regards
Steve
-- http://www.holdenweb.com http://pydish.holdenweb.com Holden Web LLC +1 800 494 3119
- Next message: Charles Allen: "Re: Microsoft Patents 'IsNot'"
- Previous message: Terry Reedy: "Re: Microsoft Patents 'IsNot'"
- In reply to: logistix at cathoderaymission.net: "Re: SQL Server stored prcedures with output parameters"
- Next in thread: Steve Holden: "Re: SQL Server stored prcedures with output parameters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|