Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Oracle SP
Message
 
 
À
10/09/2003 09:00:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00827590
Message ID:
00827832
Vues:
14
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform