Monday, 1 March 2010

Delphi - Interbase Tutorial # 2 : Create a user interface for manipulating table

After we create an alias name for our database, we’re going to create a tiny user interface for manipulating and retrieving the tables in the database. Run Delphi from start menu, you’ll have a project with a form. Add a Button, a DBgrid, a DBNavigator, a Table and a DataSource.

Button component is in the Standard page of component palette. DBGrid and DBNavigator are in Data Controls page of component palette. Table and DataSource are in the Data Access page of component palette Then set the properties as the table shown below :

Form

CaptionEMPLOYEE TABLE

Button

Caption&Exit
NameExit

Table

ActiveTrue
DatabaseNameALIASMYDATA
TableNameEMPLOYEE

DataSource

DataSetTable1

DBGrid

DataSourceDataSource1

DB Navigator

DataSourceDataSource1

Now our form appears like the picture below :

Type the code for the OnClick event of Exit button :

    procedure TForm1.ExitClick(Sender: TObject);
    begin
     Application.Terminate;
    end;


Run the program. You can navigate and manipulate employee table using DBNavigator. To exit program click the Exit button.

Go to Previous Tutorial or Next Tutorial

2 comments:

  1. Replies
    1. s There are true authentic item resource online internet directories which might be qualified by the bbb. With these online internet directories you will discover out not only by far the most amazing below common products resources, but you will discover out top strategy China suppliers common solution resources and decreased provide producers everywhere.

      Delete

These links are part of a pay per click advertising program called Infolinks. Infolinks is an In Text advertising service; they take my text and create links within it. If you hover your mouse over these double underlined links, you will see a small dialog box containing an advertisement related to the text. You can choose to move the mouse away and go on with your browsing, or to click on the box and visit the relevant ad. Click here to learn more about Infolinks Double Underline Link Ads.