Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Oracle SP
Message
 
 
To
10/09/2003 09:00:44
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00827590
Message ID:
00827832
Views:
15
In both places, switch the order of your parameters:

pnEmpPersNo IN EMP.pers_no%Type,
pCursor OUT RetCursor

Second, are you using the most recent ODBC drivers? Oracle or MS?

>Good morning Mark,
>
>I've created the following package:
>
>CREATE OR REPLACE PACKAGE GetEmplInfoSP AS
> Type RetCursor Is Ref Cursor;
> Procedure ReturnCursor(
> pCursor OUT RetCursor,
> pnEmpPersNo IN EMP.pers_no%Type);
>END GetEmplInfoSP;
>/
>CREATE OR REPLACE PACKAGE BODY GetEmplInfoSP AS
> Procedure ReturnCursor(
> pCursor OUT RetCursor,
> pnEmpPersNo IN EMP.pers_no%TYPE)
> IS
>BEGIN
> open pCursor for
> SELECT RTRIM(PERS.last_name) || ', ' || RTRIM(PERS.first_name) AS Employee,
> EMP.pers_no,
> EMP.login_lvl
> FROM EMP,
> PERS
> WHERE EMP.pers_no = PERS.pers_no (+)
> AND EMP.pers_no = pnEmpPersNo
> ORDER BY PERS.last_name,
> PERS.first_name;
> End;
>END GetEmplInfoSP;
>/
>
>I call it this way:
>
>lcSql = "{call GETEMPLINFOSP.ReturnCursor(" + TRANS(lnEmpPersNo) + ")}"
>
>lnHandle = sqlexec(gnSatHandle, lcSql, 'test_cursor')
>
>
>I get an error 1526
>"Wrong number or types of arguments in call to RETURNCURSOR"
>
>I've overlookd something But I'm not sure what.
>
>Mike
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform