Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Call Oracle store procedure
Message
 
 
To
27/06/2002 18:55:54
Paul De Niverville
Deniverville Econometric Research Ltd.
Victoria, British Columbia, Canada
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00647076
Message ID:
00673116
Views:
39
>Hi,
>
>You're right. I'm using the Microsoft ODBC Driver for Oracle. It would be difficult to switch to the Oracle ODBC driver since all my client workstations would have to be changed.
>
>I tried the example in the MSKB#Q221189 article you mentioned. I got message 'ORA-20004' from the driver using aerror().
>
>In the Oracle documentation Ora-20004 shows up twice:
>
>"ORA-20004 Syntax error attempting to parse 'X'. "
>"ORA-20004 - The object was specified with a syntax error."
>
>My version of the Microsoft ODBC driver for Oracle is 2.573.6526.00.
>
>But, really all I want is a string, like 'Update sucessful'. Is the only way to get this string is for it to be in a resultset??
>
>Thanks for your help,
>
>Paul

Paul,
If that's all you want, you can do it in two ways:

1. Create a stored procedure with output parameters
Oracle code
CREATE OR REPLACE procedure MySP (tcParam IN varchar2, lcretval out varchar2) is
BEGIN
   lcretval := 'some value';
END;

VFP code
local lcvar
=sqlexec(lnconn, [begin MySP('SomeTable',?@lcvar); end;])
2. Create a function and simply return the value:
Oracle code
CREATE OR REPLACE FUNCTION MyFunc (tcParam IN varchar2) return varchar2 IS
BEGIN
   return 'some value';
END;

VFP code
local lcvar
=sqlexec(lnconn, [begin ?@lcvar := MyFunc('SomeTable'); end;])
HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform