Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Out Parameters/Ref Cursor/Ado 2.5

Re: Out Parameters/Ref Cursor/Ado 2.5

From: Keith Jamieson <Keith.Jamieson_at_phoenix.ie>
Date: Wed, 4 Apr 2001 10:04:22 +0100
Message-ID: <9aeo4i$3jd$1@kermit.esat.net>

The out parameters get populated when the procedure is called via sqlplus, but the call via ADO actually fails when a recordet is not generated. The call via ADO works when a recordset is generated.

Since the call via ADO fails when a recordset is not generated, I don't have any out parameters to get the results from.

M Hashim wrote in message <3ACA86B7.C27B3D95_at_passport.ca>...
>A couple of choices.
>1. You can check for NULL data set in ADO
>2. Return the Numrows in an OUT parameter and check for >0.
>
>Keith Jamieson wrote:
>
>> I have a procedure which populates a ref cursor based on the memberid
 passed
>> in. This works fine when called from VB/ADO 2.5 as long as the memberid
>> exists.
>>
>> The syntax of the call is below:
>>
>> set rsRecordset = objCommand.Execute
>>
>> If an invalid memberid is passed in, I don't populate the ref cursor.
>> Instead, two out parameters are populated, one with the error message and
>> one with the error text.
>>
>> However, the ADO call to the procedure fails since the recordset does not
>> exist. The Out Parameters are not populated either.
>>
>> The error message is below:
>>
>> ORA - 03113 End of File on Communication Channel.
>>
>> The only workaround I can think of is to issue a select from dual
>> where X=Y to generate an empty recordset. However, this would involve
 quite
>> a significant amount of rework.
>>
>> Has anyone come across this problem beforw, and If so, how did they
 resolve
>> the situation.
>> NB: The procedure works as expected when called from sqlplus.
>
Received on Wed Apr 04 2001 - 04:04:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US