Z
zhj218
Unregistered / Unconfirmed
GUEST, unregistred user!
1、生成一个包
CREATE OR REPLACE PACKAGE TypeDefine
AS
TYPE Cursor_Test IS REF CURSOR RETURN Test%ROWTYPE;
END;
2、生成一个存储过程;
CREATE OR REPLACE PROCEDURE sp_test
(resultData IN OUT TypeDefine.Cursor_Test)
AS
BEGIN
OPEN resultData FOR
SELECT a,b from test;
END;
3、在ORACLE中执行测试:
VARIABLE v REFCURSOR;
EXECUTE sp_testv);
PRINT :v;
上述情况正常
delphi调用出错;
storedproc1.StoredProcName:='SP_TEST';
storedproc1.ParamByName('resultData').DataType:=ftcursor;
// storedproc1.Params[0].Name:='resultData';
StoredProc1.Prepare;
StoredProc1.ExecProc;
执行第二步就出错了,请各位指教
CREATE OR REPLACE PACKAGE TypeDefine
AS
TYPE Cursor_Test IS REF CURSOR RETURN Test%ROWTYPE;
END;
2、生成一个存储过程;
CREATE OR REPLACE PROCEDURE sp_test
(resultData IN OUT TypeDefine.Cursor_Test)
AS
BEGIN
OPEN resultData FOR
SELECT a,b from test;
END;
3、在ORACLE中执行测试:
VARIABLE v REFCURSOR;
EXECUTE sp_testv);
PRINT :v;
上述情况正常
delphi调用出错;
storedproc1.StoredProcName:='SP_TEST';
storedproc1.ParamByName('resultData').DataType:=ftcursor;
// storedproc1.Params[0].Name:='resultData';
StoredProc1.Prepare;
StoredProc1.ExecProc;
执行第二步就出错了,请各位指教