Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Syntax to create a simple stored proc.
Message
General information
Forum:
Oracle
Category:
Third party products
Miscellaneous
Thread ID:
01510822
Message ID:
01510827
Views:
31
>>I need an orcale stored procedure that does this:
>>
>>Select * from appconfig where appconfig.app_pk = myvar into cursor MyReturnCursor
>>
>>...all very simple (so I thought)
>>
>>1. Pass parameter myvar
>>2. Run select statement
>>3. Get results into a cursor
>>
>>Anyone know the syntax to do this?
>>
>>Thanks!
>
>Have you tried googling?
>
>http://www.geekinterview.com/talk/5073-simple-example-of-oracle-stored-procedure.html

Yeah I been googling for like 30 minutes ...just not having much luck.

I *think* I have an SP that should work now - it looks like this:

CREATE OR REPLACE PROCEDURE KPOPS."Victor_test3" (m_pk INTEGER, m_condesc varchar2, m_convalue varchar2)
AS
CURSOR APPCONFIG_CURSOR(appconfig_pk integer, config_description varchar2, config_value varchar2) IS
SELECT *
FROM appconfig ;

BEGIN
open APPCONFIG_CURSOR(m_pk, m_condesc, m_convalue);
END;


....so now the next question is how the heck to I call that from VFP??

I thought this would work - its how I did it using SQL server stored procedures...this should call Victor_Test3 and the returning cursor should be in ResultSet.

lnConnectionHandle = SQLCONNECT('myConnection', .T. )
lnSQLEXECResult = SQLEXEC(lnConnectionHandle , 'EXEC victor_test3', 'ResultSet')
ICQ 10556 (ya), 254117
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform