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')