Scott or Robin
I have been trying to call an Oracle stored procedure but I keep on getting a meesage
saying that
the stored procedure has failed and an oracle error saying that the incorrect
parameters have been passed
I checked the ingoing parameters and these are sent to the stored procedure correctly
( this I did
while runnung a debugging session of ND4.1.3). I also do not get anything back. I also
attached
my result set to a static display field in the page where I wanted my result set to be
displayed but to no avail
I have attached a file for you to look at if you can help
Thanx
Bola
"Scott, Chris" <[EMAIL PROTECTED]> wrote:
>Thanks, Robin, that's what I would have expected, but I forgot to>mention I'm
>executing the stored proc from client-side java, so I don't
>have a reference to the data object. Also, I was getting the rogue wave
>"invalid position within stored procedure" error.
>
>Now it works, though. For the record, here's how to do it:
>1. Create stored proc in oracle.
>
>create or replace procedure spNameLookup
>(site_id_in in site.site_id%type,
> query_id out integer
>)
>
>2. Define data object in ND studio.
>
>spNameLookup
>
>3. Code call to proxy.
>
>// ndProxy is of type CSpCPHttpProxy.
>// Set up input parameters.
>CSpNvpList nvpList = new CSpNvpList();
>nvpList.put(new CSpNvp("Parameter_SITE_ID_IN", String.valueOf(1)));
>// Call the proxy. The data object is executed on the server.
>CSpDBProcedureResult dbr =
>(CSpDBProcedureResult)ndProxy.executeProcedure("spNameLookup", nvpList);
>if (dbr != null && dbr.getResultStatus().getErrorCode() == 0)
>{
> // Only output parameters are returned.
> CSpDBProcedureParam pp = dbr.getReturnParameters();
> System.out.println("Executed spNameLookup, nvpList=" +
> nvpList + ",param 0=" + pp.getParameter(0).stringValue());
>}
>
>> -----Original Message-----
>> From: Karatra, Robin [SMTP:[EMAIL PROTECTED]]
>> Sent: Thursday, July 30, 1998 9:06 AM
>> To: Scott, Chris;
>> [EMAIL PROTECTED]
>> Subject: RE: [ND] getting output parameters from oracle stored
>> procedures
>>
>>
>> Output paramters are at index 0. You may want to use
>> dObject.getValue(0,"Parameter_o_whatever");
>>
>>
>> > -----Original Message-----
>> > From: Scott, Chris [SMTP:[EMAIL PROTECTED]]
>> > Sent: Wednesday, July 29, 1998 9:27 PM
>> > To: [EMAIL PROTECTED]
>> > Subject: [ND] getting output parameters from oracle stored
>> procedures
>> >
>> > In ND, how do I get the value of an output parameter from an oracle
>> > stored procedure?
>> >
>> >
>> ______________________________________________________________________
>> ___
>> >
>> > For help in using, subscribing, and unsubscribing to the discussion
>> > forums, please go to: http://www.netdynamics.com/support/#forums
>> >
>> > For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]