Delphi .AsCursor / Overflow ?

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Guest

Delphi .AsCursor / Overflow ?

Post by Guest » Fri 30 Sep 2005 12:59

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

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Tue 04 Oct 2005 06:54

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.

Post Reply