Page 1 of 1

Delphi .AsCursor / Overflow ?

Posted: Fri 30 Sep 2005 12:59
by Guest
Hi,

When using Oracle "REF CURSOR" with ODAC,
i manage to get the dataset result _but_ the first record has garbage on it.

Here's the Delphi source code calling Oracle StoredProc
and linking the DataSet result (Ref Cursor untyped) to OraQuery :

QuerySyn.Close;
OraSPSyn.Close;
OraSPSyn.ParamByName('aOpe').asInteger:=SQLOpeCode;
OraSPSyn.ExecSQL; // options .: [ScrollableCursor + ReturnParams]
QuerySyn.Cursor:=OraSPSyn.ParamByName('aCursor').asCursor;
QuerySyn.open;


Does these troubles are related to the client ODAC version (5.55.0.19 for D7) ? How to get the dataset result with no additionnal garbage record ?


TIA

Pascal
http://chapsandchips.com

Posted: Tue 04 Oct 2005 06:54
by Alex
To avoid this problem you can use TOraStoredProc as DataSet to get data. To use your approach you should use TOraSQL instead of TOraStoredProc. To generate SQL that will call stored procedure use use OraSQL editor/Stored Proc Call Generator.