There are many ways to do what you are asking.
The most straight-forward way is to use a descendant of TDataset. The most common ones in Delphi for accessing Microsoft Jet would probably be dbGo (ADO Express when it was introduced in Delphi 5). If you've already hooked up the UI you're likely already using it. The same tables and queries you used to hook to your UI can be accessed directly in code. TADOQuery and TADOTable both support stepping through the dataset (using Next
), searching for specific records (using Locate
or Seek
) and accessing fields (using FieldbyNumber
or FieldbyName
)
For small and medium sized applications this is the easiest way to persist your data. Alternatively you can access the same data using the UI controls you've already hooked up to the data source. All the Delphi standard db aware controls have a Field
property and many have a Text
property.
For larger applications with complex business rules a domain layer with an ORM(Object/Relational Mapper) as the persistence layer is recommended.
Of course, small projects have a way of turning into big projects over time. So it would benefit you to plan accordingly.