Record 0 not accessible in unidirectional mode

smouge

Member
Just did a test with delphi 7 and oracle 8.1.7i to see the new unidirectional propertie.

Opened a database, went to the last record, then with the navigator to the firt record and got the following error message:

.. raised exception class Exception with message 'OracleDataSet1: Record 0 not accessible in Unidirectional mode.'
 
In unidirectional mode you cannot go back to previous records, because the records are not buffered by the dataset. To navigate the result set from the last to the first record, use an order by clause instead. To re-visit the first record, either use a non-unidirectional dataset or call Refresh.

To quote the help file on this topic:

Declaration
property
UniDirectional: Boolean;

Description
When True, the TOracleDataSet will no longer buffer previously fetched records. As a result there will not be any memory overhead when processing large numbers of records, which can be useful for batch processing or reporting functionality.

Note
A UniDirectional dataset can not be used for functions that require navigation to prior records or to the first record, such as a TDBGrid or a TDBNavigator. When these navigation functions are used, an exception will be raised.

------------------
Marco Kalter
Allround Automations
 
Back
Top