Return a single value from a Sybase stored procedure using ADO
- From: "Rick H" <rickh_1960@xxxxxxxxxxx>
- Date: 2 Oct 2006 10:38:00 -0700
I have been fighting with this for a couple days.
I need to return a number from a Sybase SQLAnywhere(9) stored procedure
which has one In parameter (string) and one Out (integer).
I'm calling it from a Outlook Com addin (VB6).
I debug the SP in Sybase and it fires and sets the return value to the
proper value but I get error on the ADO call.
Error Message:
"Run Time Error '3704'"
"Operation is not allowed when the object is closed"
The error message appears at the "While Not" line
The ADO code:
Dim objConn As Object
Dim objRs As Object
Set objConn = CreateObject("ADODB.Connection")
Set objRs = CreateObject("ADODB.Recordset")
objConn.connectionString = testt
objConn.Open
objRs.Open "exec get_new_key 'appnt_key'", objConn
While Not objRs.EOF
atlnum = objRs.Fields(0)
objRs.MoveNext
Wend
.
- Follow-Ups:
- Re: Return a single value from a Sybase stored procedure using ADO
- From: Dmitriy Antonov
- Re: Return a single value from a Sybase stored procedure using ADO
- Prev by Date: Re: Sharing a ADO connection between two processes - Can it be done ?
- Next by Date: Re: Return a single value from a Sybase stored procedure using ADO
- Previous by thread: Sharing a ADO connection between two processes - Can it be done ?
- Next by thread: Re: Return a single value from a Sybase stored procedure using ADO
- Index(es):
Relevant Pages
|