Re: Help with Oracle, Store Procedures, Refcursors, ASP, ADO

From: Tak Sato <tsato_at_web.de>
Date: 27 Mar 2003 00:57:34 -0800
Message-ID: <330fe73e.0303270057.2702dc48_at_posting.google.com>


hi David

here. the error-def:
-->ORA-00900 invalid SQL statement

Cause: The statement is not recognized as a valid SQL statement. This error can occur if the Procedural Option is not installed and a SQL statement is issued that requires this option (for example, a CREATE PROCEDURE statement). You can determine if the Procedural Option is installed by starting SQL*Plus. If the PL/SQL banner is not displayed, then the option is not installed.

Action: Correct the syntax or install the Procedural Option. <--

check your SQL-statement first.

Tak

dpio222_at_earthlink.net (David Pio) wrote in message news:<32b291b3.0303261750.7a02b6b3_at_posting.google.com>...
> I am using ASP and ADO to connect to an Oracle DB. There is a stored
> procedure I want to call that returns a refcursor as one of the
> parameters. Everytime I try to execute I get a "
> [Oracle][ODBC][Ora]ORA-00900: invalid SQL statement " message.
>
> any solution? the database is setup correctly as others have used that
> same procedure w/ Perl and JDBC.
>
> Here is a code snippet, the stored procedure 'command' in package
> 'package' has 2 parameters, the 1st is the refcursor, the 2nd is a
> text character
>
>
> // Create the command object and set the query to be executed
> Set objCmd = Server.CreateObject("ADODB.Command")
> Set objCmd.ActiveConnection = objConn
> objCmd.CommandType = adCmdStoredProc
> objCmd.Parameters.Append(objCmd.CreateParameter("param2", adVarChar,
> adParamOutput, 4))
> objCmd.CommandText = "package.command" //(:refcur,:stat)
>
> Set objRS = Server.CreateObject("ADODB.RecordSet")
> objRS.CursorType = adOpenStatic
> objRS.LockType = adLockReadOnly
> Set objRS = objCmd.Execute()
>
>
> Thanks!
Received on Thu Mar 27 2003 - 09:57:34 CET

Original text of this message