Using IBDataset

With Delphi 5, Firebird tables should be accessed via an IBDataset instead of an IBTable - there is a significant speed difference.

Basic Form | SQL | Read a Value | Insert/Update | References


Basic Form

On the form place Note: I personally prefer to use mixed case table and field names ... I think that they are easier to read.


SQL

These are typical SQL statements (the last 4 are generated by the Dataset Editor...) - most of the fields are removed for simplicity.




Read a Value

This is one way to get a value from a specific record


Insert/Update

This code will update an existing record ... or create a new record if necessary. (Most of the parameters were removed for clarity - the original function accepted 35 parameters.) Note: I normally line up the dots and assignment operators as shown above ... I think that this makes the code easier to read.

Note: This table has only one record per key - the data is updated once every 6 minutes.


References


Author: Robert Clemenzi - clemenzi@cpcug.org
URL: http:// cpcug.org / user / clemenzi / technical / Databases / Delphi / IBDataset.html