Could someone please point me in the right direction?
I have a job to do using Delphi7 to access a Firebird 1.5 database - and the CoreLabs product looks very slick and robust. I've been looking through the demo files supplied with the trial software - these illustrate nicely how to communicate with data-aware controls. I did not find one which demonstrated how to do cursor handling - for instance to run a query across a number of tables and then step through each record of the resulting recordset, loading the fields in each record into program variables and taking some action on them and then moving on to the next record and repeating the process until the end of the recordset. The sort of thing you would do if you had a database of customer details and each week you wanted to programatically send them an update by email. It would be very nice if someone could point me to some sample code or indicate how to do this please.
Cheers,
John
How to do cursor handling with Delphi7 & Firebird 1.5 ?
-
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53
Here is the sample:
Code: Select all
var
ID: integer;
Name: string;
begin
IBCQuery.SQL.Text := 'select ID, Name from sometable';
IBCQuery.Open;
While not IBCQuery.Eof do begin
ID := IBCQuery.FieldByName('ID').AsInteger;
Name := IBCQuery.FieldByName('Name').AsString;
IBCQuery.Next;
end;
end;