header image
Home arrow Programming arrow Databases

There are many ways through which a database can be used in Delphi - on this site we focus on using ADO Connections, Tables and Queries.

Items relevant to databases:


Steps for setting up a ADO Table in Delphi:

1) Create database file in MS Access
2) In Delphi: choose ADOtable under the ADO menu on the component palette
3) Change settings in the Object Inspector: change the Connection String settings by clicking on the ellipse
4) Click on Build...
5) Choose: Microsoft Jet 4.0 OLE DB Provider
6) Click Next >>
7) Select database file (Choose 'mdb' file)
8) Erase user name
9) Make sure 'Blank Password' is selected
10) Click OK (on 'Data Link Properties' window)
11) Click OK (on 'ConnectionString' window)
12) Click on ADOTable component: choose Table name for ADOTable (tbl...)
13) Set ADOTable Active to TRUE
14) Right click on ADOTable and choose Fields Editor
15) Right click and choose ‘Add all fields’
16) Set the 'currency' property for the Amount and Total fields to 'true'
17) Add DataSource (link to tbl...)
17) Add DBGrid and DBNavigator (link to DataSource)
18) Add other components (SaveDialog, OpenDialog, buttons and edit boxes):

Members: 2
News: 41
Web Links: 4
Visitors: 534459