|
Written by JAK Olivier
|
|
Jun 29, 2009 at 09:53 AM |
|
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):
|
|
Last Updated ( Jun 29, 2009 at 07:10 AM )
|