Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    Jaipur, India
    Posts
    40

    Unanswered: Returning recordset from oracle to VB

    Hi there,
    Well I had encountered with this problem, as I want to return a no. of rows as a recordset from an Oracle procedure and want to open that as a recordset in VB. I had tried this...


    create or replace PACKAGE PackPerson
    AS
    TYPE tbl_dt IS TABLE of date
    INDEX BY BINARY_INTEGER;

    PROCEDURE Getserverdate3 (dtCurr OUT tbl_dt);

    END PackPerson;
    /



    create or replace Package Body PACKPERSON
    as

    PROCEDURE Getserverdate3 (dtCurr OUT tbl_dt)
    IS
    CURSOR c1 IS
    SELECT sysdate
    FROM dual;

    percount number default 1;

    BEGIN
    FOR c in c1 LOOP
    dtCurr(percount) := c.sysdate;
    percount := percount + 1;
    END LOOP;
    END;

    END PACKPERSON;


    and in VB I had opened this as ......

    Dim rsgetDate As ADODB.Recordset
    Set rsgetDate = New ADODB.Recordset
    rsgetDate.Open "exec Getserverdate3 ", mycon, 3, 3

    but on executing got this error:

    ORA-00900: Invalid SQL statement..


    Please help.
    Thanking u in anticipation.
    RGDS
    Amit

  2. #2
    Join Date
    Feb 2004
    Location
    India
    Posts
    22

Posting Permissions

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