Before you start, close any open projects. Then use the following steps:
- Select File|New Application. This creates a new project containing an empty form, a unit, and a project file.
- Place one TPageControl on the form. TThe PageControl can be found on the Win32 tab on the component palette. Let it have the default name, PageControl1.
- Add two tab sheets to the PageControl (right-click on the PageControl1 and select "New Page"). Set the Caption of the first TabSheet1 to "Browse". Set the Caption of the second TabSheet2 to "Edit".
- Place a TDataSource (DataAccess tab), a TADOTable and a TADOConnection (ADO tab) component on the form. Leave all the components with their default names.
- Select the first page of the PageControl and place a TDBGrid (Data Controls tab) component on the "Browse" tab sheet.
- Place a TDBNavigator component (Data Controls tab). The navigator buttons are used to move through the records in the recordset.
DBNavigator1.DataSource = DataSource1You can use the same connection string as in the second chapter, or you can build one by invoking the connection string editor.
DBGrid1.DataSource = DataSource1
DataSource1.DataSet = ADOTable1
ADOTable1.Connection = ADOConnection1
ADOConnection1.ConnectionString = ...
ADOConnection1.LoginPrompt = False
ADOTable1.Table = 'Applications'
Setting the LoginPrompt property of the ADOConnection component to False suppresses the database login from showing. Since we have not set any password for our database we don't need the login prompt.


