Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Oracle stored function
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00926057
Message ID:
00926104
Vues:
27
>Hi all,
>
>Trying to call a stored function from vfp5 using odbc, not ado. I'm having issues with the correct syntax of the statement. Can I not use the standard vfp sqlexec() command? ( i.e. sqlexec( connhandle, "{call package.function()}, "returncursor" ) Any help would be great since my customer has no clue on this, and frankly, neither do I.
CREATE OR REPLACE PACKAGE CustomerGetByID AS
 Type RetCursor Is Ref Cursor;
 Procedure ReturnCursor(
   pCursor OUT RetCursor,
   nKeyID IN Customer.KeyID%Type);
END;
/
show error
CREATE OR REPLACE PACKAGE BODY CustomerGetByID AS
 Procedure ReturnCursor(
   pCursor OUT RetCursor,
   nKeyID IN Customer.KeyID%Type)
 IS
 Begin
  open pCursor for
    select * FROM Customer where KeyID = nKeyID;
 End;
END;
/
show error
The VFP code is:
lcSQL = "{call CustomerGetByID.ReturnCursor(" ;
      + TRANSFORM(This.nKeyID) + ")}"
lnRetVal = SQLEXEC(nHandle, lcSQL, 'crsCustomer')
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform