Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Oracle Stored Procedures returning records
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00903180
Message ID:
00904224
Views:
17
Ok I have the Code like yours now and it runs.
The problem is I don't know how to get the records to show up on the VFP Side after the SQLEXEC.
***This is the code that works
CREATE OR REPLACE PACKAGE Get_today_3 AS
 Type RetCursor Is Ref Cursor;
 Procedure ReturnCursor
 (
   pCursor OUT RetCursor,
   cWarehouse IN detailbohoutput.warehouse%Type,
   cCompany   IN detailbohoutput.company%Type
 );
END;
/
show error
CREATE OR REPLACE PACKAGE BODY Get_today_3 AS
 Procedure ReturnCursor
 (   pCursor OUT RetCursor,
     cWarehouse IN detailbohoutput.warehouse%Type,
     cCompany   IN detailbohoutput.company%Type
  )
 IS
 Begin
  open pCursor for
    select * FROM detailbohoutput 
     where asofdate = trunc(sysdate) -1 
       and warehouse = cWarehouse
       and company = cCompany ;
 End;
END;
/
show error
This is what I do to run it from VFP
*** I do the declare to let the proc know what is pCursor is
TEXT TO lcSQL
DECLARE
TYPE CURSOR_TYPE_1 IS REF CURSOR;
pcursor CURSOR_TYPE_1; 
begin
 get_today_3.returncursor(pcursor,
ENDTEXT 
lcSQL = lcSQL + [']+ lcCompany + ['] + ',' + ['] +lcwarehouse + ['] + "); End;"


lnRetVal = SQLEXEC(lnHandle, lcSQL, 'todays_view')
lnRetVal comes back greater than 1 so I know it works.
but when I get to
   Select todays_view && Errors out here because there isn't cursor open named 'Todays_view'
   *** As a matter of fact there isn't anything open at all
   browse
PS. Right now I am using Microsoft ODBC for Oracle driver.
Do I need another type of driver?
What is Wisdom?
Wisdom - The ability to respond to any situation according to God's Plan.
Therefore:
USE Wisdom IN Everything ORDER priority AS Knowledge
SELECT Knowledge
BROWSE FOR Understanding WHERE Wisdom=Guide

LeRoy Jackson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform