Peter Bragg
15-Mar-2005, 06:21 AM
Whether or not this is the correct newsgroup I don't know ... but ....
Can anyone help me out with an example on how I can get the value of a
stored procedure parameter that is marked for output? I have looked at the
help in the 'embedded SQL User's Guide.pdf' document that comes with vdf10.1
but still am none the wiser!
I have a Stored Procedure. I can set all the required arguments and execute
it successfully .. but seem unable to retreive the value of the output
parameter. I have tried various odds n' sods, but basically do the
following:
Send SQLSetProcedureName of q <procedure_name>
Send SQLSetArgument of q 1 <value>
Send SQLSetArgument of q 2 <value>
etc.
Send SQLSetArgument of q 19 <value>
Send SQLCall of q
If I then do something like
Get SQLGetArgument of q 1 to sValue, I can see the 'input' parameter value
for the 1st parameter ok.
The Output parameter is the 20th defined parameter, but coding "Get
SQLGetArgument of q 20 to sValue" simply returns a blank string.
I read in the help that the output params maybe returned in a different
results set, but I have tried various pieces of code calling "Get
SQLNextResultSet of q to iRetVal" and then using both SQLGetArgument AND
SQLGetArguments but have had no joy.
Clearly I am missing something obvious. But what? (VDF10.1 MSSQL 2000)
Peter Bragg
Can anyone help me out with an example on how I can get the value of a
stored procedure parameter that is marked for output? I have looked at the
help in the 'embedded SQL User's Guide.pdf' document that comes with vdf10.1
but still am none the wiser!
I have a Stored Procedure. I can set all the required arguments and execute
it successfully .. but seem unable to retreive the value of the output
parameter. I have tried various odds n' sods, but basically do the
following:
Send SQLSetProcedureName of q <procedure_name>
Send SQLSetArgument of q 1 <value>
Send SQLSetArgument of q 2 <value>
etc.
Send SQLSetArgument of q 19 <value>
Send SQLCall of q
If I then do something like
Get SQLGetArgument of q 1 to sValue, I can see the 'input' parameter value
for the 1st parameter ok.
The Output parameter is the 20th defined parameter, but coding "Get
SQLGetArgument of q 20 to sValue" simply returns a blank string.
I read in the help that the output params maybe returned in a different
results set, but I have tried various pieces of code calling "Get
SQLNextResultSet of q to iRetVal" and then using both SQLGetArgument AND
SQLGetArguments but have had no joy.
Clearly I am missing something obvious. But what? (VDF10.1 MSSQL 2000)
Peter Bragg