Unknown isc error 0 on Delphi XE TClientDataSet.Next

I have a data structure while connecting DBXpress to Firebird database. In a specific part of the system, I add data splitting by combination of ClientDataSet, DataSetProvider and SQLQuery. It worked well, but lately it started raising an unknown isc error 0 error when I run Next on the ClientDataSet after various correct calls. The way I am using to do the pagination is:

if not ClientDataSet.Active then
    ClientDataSet.Open;
RecNo := ClientDataSet.RecNo; // I need to preserve the actual selected register too
ClientDataSet.DisableControls;
LastRecNo := GetLastRecNo; // This just discover the last RecNo that i have previously stored. This cares about DataSet.Eof too, returning -1
if LastRecNo > -1 then
begin
    ClientDataSet.RecNo :=  LastRecNo;
    ClientDataSet.Next; // LastRecNo is already processed
    while (not ClientDataSet.Eof) and (Result < DATA_PAGE_SIZE) do
    begin
         // ... Process record, not important here ...
         ClientDataSet.Next; // The exception is raised here
         Inc(Result);
    end;
end;
ClientDataSet.RecNo := RecNo; // Back to selected register
ClientDataSet.EnableControls;

      

This code is called multiple times (for example 15 times) and no exception is thrown, otherwise it is thrown and an exception is thrown. Does anyone know why this is happening?

I read that there might be problems connecting to the database, but the database is on localhost, the connection string I am using is like "localhost: C: \ Path \ Base.FDB".

EDIT: This code runs when the user scrolls down on the mouse, moves down the scrollbar, or moves to items near the end of the list. In recent tests, I found that if I stop with a breakpoint on all these calls, then I can get all the records, the exception will not be raised. I'm pretty sure I don't have another thread modifying the ClientDataSet.

+3
delphi tclientdataset


source to share


No one has answered this question yet

Check out similar questions:

sixteen
How to make Firebird client application wait for row unlock
3
Avoid memory corruption in ClientDataSets with poPropagateChanges and poFetchDetailsOnDemand?
3
XE6 ClientDataSet AV trying to load data from Firebird
1
How to get all records via TDatasetProvider?
1
Connecting to Local Server via dBExpress
1
Delphi TAdoConnection Master / Detail: duplicate entries in a grid
0
Delphi TADOQuery.next skips write
0
DataSetProvider error?
0
Debugging and / or Optimizing Android DataSnap Delphi Application
0
ClientDataSet only partially transfers data from TADOQuery



All Articles
Loading...
X
Show
Funny
Dev
Pics