Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CALLING ORACLE SP with parameters
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Oracle
Application:
Desktop
Miscellaneous
Thread ID:
01389524
Message ID:
01510830
Views:
64
>Hi Sergey, Naomi,
>
>Got it to work, I think you need the following
>
>1) Initialize the variable like you mentionned earlier
>2) Variable need to be PRIVATE
>3) Parameter need to be sent by reference with @
>
>
>
>PRIVATE P1,P2,P3,P4,P5,P6,P7,P8,P9,P0 AS Number
>STORE 0 TO P1,P2,P3,P4,P5,P6,P7,P8,P9,P0
>STORE NULL TO P1,P2,P3,P4,P5,P6,P7,P8,P9,P0
>
>
>TEXT TO lcSQL TEXTMERGE NOSHOW PRETEXT 15
>{CALL ESC60.MOVE_PATIENTS_MAINT ('MTL',									'<<THISFORM.PNO>>',
>	'QC',
>	'9000',
>	'<<C_Import.PATNO>>',
>	'<<THISFORM.PNO>>',
>	'QC', 
>	'<<C_Import.CNO>>', 
>	'<<C_Import.PATNO>>',
>	?@P1, ?@P2, ?@P3, ?@P4, ?@P5, ?@P6, ?@P7, ?@P8, ?@P9, ?@P0 ) }
>ENDTEXT
>		
>lnResult = SQLEXEC(THISFORM.oESC.DataObj.ConnectHandle,lcSQL)
>
>
>
>Re: CALLING ORACLE SP WITH PARMS Thread #1389524 Message #1389631


OMG this is driving me nuts. Ok lets try another approach:

1. In Oracle, create Stored procedure does nothing but this:

Select * from appconfig into cursor myReturnDataSet

2. From VFP - run #1 and get the results into a VFP cursor.


...now for some reason I seem to be having an impossible time doing something that should be super simple. To begin with I don't know if my stored procedure is even right.

This is what I have for the SP:

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;

....the fieldnames in the appconfig table are:
appconfig_pk
config_description
config_value

Now the above SP compiles ok - but I'm 100% clueless if this is how its supposed to look. Like is the m_pk parameters or something?
ICQ 10556 (ya), 254117
Previous
Reply
Map
View

Click here to load this message in the networking platform