In the previous tutorial we created a user interface for manipulating table using DBGrid. Now we’re going to create one using DBEdit. We can use our previous program. Replace the DBGrid in the previous program with some labels and DBEdits, like the picture shown below :
Set the properties of the labels and DBEdits like tables below :
Label1
Caption | ID |
Label2
Caption | NAME |
Label3
Caption | AGE |
Label4
Caption | PHONE |
DBEdit1
DataSource | DataSource1 |
DataField | ID |
DBEdit2
DataSource | DataSource1 |
DataField | NAME |
DBEdit3
DataSource | DataSource1 |
DataField | AGE |
DBEdit4
DataSource | DataSource1 |
DataField | PHONENUMBER |
Use the codes for the OnClick event of the buttons. Do not change the properties of Form, Table, DataSource and Buttons. Run the program, and now we can manipulate the ‘employee’ table using Buttons and DBEdits.
0 comments:
Post a Comment