faqts : Computers : Programming : Languages : Delphi

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 3 people (100%) answered Yes
Recently 3 of 3 people (100%) answered Yes

Entry

Delphi: Database: Create: How to create a very simple database navigator using the BDE?

Aug 24th, 2003 13:35
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden - 21 August 2003 - 09:33 pm -----------------------

Delphi: Database: Create: How to create a very simple database 
navigator using the BDE?

Steps: Overview:

 1. -First create a table
     (e.g. using Borland Database desktop)

http://www.faqts.com/knowledge_base/view.phtml/aid/23910/fid/175

http://www.faqts.com/knowledge_base/view.phtml/aid/23858/fid/175

 ---

 2. -Create an alias for this table

http://www.faqts.com/knowledge_base/view.phtml/aid/23861/fid/175

 ---

 3. -Open a new application:
     -start your Delphi
      -select from menu option 'File'
       -select from list 'New'
        -select from list 'Application'

 ---

 4. -Put a 'Table' component on the form
     -Open the 'BDE' palette
      -double click on icon 'Table'
       -change property 'DatabaseName' = '<one of the aliases defined 
for your databases>'
        (e.g. choose the alias 'propertypicture')
        -change property 'TableName' = '<one of the tables part of 
this database>
         (e.g. choose the alias 'propertypicturetableT.db')
         -change property 'Active' = 'True'

 5. -Put a 'DataSource' component on the form
     -Open the 'Data Access' palette
      -double click on icon 'DataSource'
       -change property 'DataSet' = 'Table1'

 6. -Put a 'dbgrid' component on the form:
     -Open the 'Data Controls' palette
      -double click on icon 'DBGrid'
       -change property 'DataSource' = 'DataSource1'

 7. -Put a 'dbnavigator' component on the form:
     -Open the 'Data Controls' palette
      -double click on icon 'DBNavigator'
       -change property 'DataSource' = 'DataSource1'

 8. -Save and run the application

     You will have a working database if everything
     went as planned, where you can edit, insert,
     delete and navigate fields in the records.

----------------------------------------------------------------------