Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2005
    Posts
    9

    Unanswered: Cursor reference or ODBC error?

    I have the following ASP code. Call an Oracle procedure
    named myprocedure(), in package "pkg" belongs to schema
    "myschema", and this procedure returns a recordset. The
    Oracle procedure has been working for years. The Oracle
    procedure returns a recordset specified in the second
    parameter called my_recordset.

    --------------------- ASP code in myfile.asp --------------------------
    Set Recordset1 = Server.CreateObject("ADODB.Recordset")
    Recordset1.ActiveConnection = MM_xyz_STRING

    Recordset1.Source = "{call myschema.pkg.myprocedure('" + Replace(Recordset1__session_user, "'", "'
    '") + "',?)}"

    Recordset1.CursorType = 0
    Recordset1.CursorLocation = 2
    Recordset1.LockType = 1
    Recordset1.Open() ' error points to this line - line 100
    Recordset1_numRows = 0
    ------------ Oracle procedure myprocedure ---------

    procedure myprocedure(user_in in varchar2, my_recordset out types.cursortype)
    as
    begin
    open my_recordset for
    select name, addr from employee
    .......
    end myprocedure;

    --------Following is the error shown on the web browser -------
    Error Type:
    ADODB.Recordset.1 (0x80004005)
    SQLState: 07001 Native Error Code: 0 [DataDirect][ODBC Oracle Wire Protocol driver]Value has not been specified for parameter 1.
    /dir1/myfile.asp, line 100

    ------------------ ENd of browser error ------------------------

    Note: Line 100 is Recordset1.Open() in myfile.asp

    Did I not handle the return recordset properly or something wrong with the ODBC driver?

    Thanks you so much!!!

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool


    Your variable Recordset1__session_user is empty.

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Jul 2005
    Posts
    9

    Recordset reference or ODBC driver error?

    I actually used response.end to stop the ASP code just before the myprocedure() gets called. Then I displayed the value to be passed
    to the procedure as the first parameter. It had a valid value though.
    That's why I don't really understand.

    1. Is the error kind of misleading and it actually was an ODBC error?
    2. Does anyone know how I can display the return values of the recordset?

    Thanks for your time and i appreciate very much!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •