Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Call Oracle store procedure
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00647076
Message ID:
00652326
Views:
37
Thank you very much...it was a great help.


>Put the following code after editing it for your situation into a script [text] file [myscript.sql]. Use Notepad to do so:
>CREATE OR REPLACE PACKAGE CustomerGetByLastName AS
> Type RetCursor Is Ref Cursor;
> Procedure ReturnCursor(pCursor OUT RetCursor, cUser IN Customer.LastName%Type);
>END;
>/
>show error
>CREATE OR REPLACE PACKAGE BODY CustomerGetByLastName AS
> Procedure ReturnCursor(pCursor OUT RetCursor, cLastName IN Customer.LastName%Type) is
> Begin
>  open pCursor for
>    select * from SCHEMA_NAME.Customer where LastName = cLastName;
> End;
>END;
>/
>show error
>--
>
>Save the script file. I keep mine in a folder under my App development folder called SCRIPTS. Launch SQL*Plus and run this script file. You run it by typing @C:\AppDev\MyApp\Scripts\MyScript at the SQL prompt.
>You call the SP from VFP using this syntax:
>lcSQL = "{call SCHEMA_NAME.CustomerGetByLastName.ReturnCursor('"
>      + alltrim(ThisForm.txtLastName.Value) + "')}"
>lnRetVal = SQLEXEC(gnHandle, lcSQL, 'crsCustomer')
Shawn Dorion
Geo Sektor Dot Com
Website: http://www.geosektor.com

Web Hosting Plans
Visit : http://WebHosting.Applications4u.com/
Previous
Reply
Map
View

Click here to load this message in the networking platform