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
Caption | EMPLOYEE TABLE |
Button
Caption | &Exit |
Name | Exit |
Table
Active | True |
DatabaseName | ALIASMYDATA |
TableName | EMPLOYEE |
DataSource
DataSet | Table1 |
DBGrid
DataSource | DataSource1 |
DB Navigator
DataSource | DataSource1 |
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.
ampun gaptek boss
ReplyDeletes 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