Objective:
Link visual basic with microsoft Access data base using ADODC
Content / Procedure:
- Link ADODC in visual basic
- Browse the database in connection string
- Select the database path
- Complete
Result and Analysis:
In visual basic 6.0 user able to connect the database easily. One of the method is using the ADODC component . To create the ADODC component in the visual basic, drag the icon ADODC in the left pane of visual basic then rename it .Then rename it before go to ADODC properties in the right hand side in visual basic. In connection string, click browser button to select the database path or directory in the server.The database format is .mdb file, whereby the database in format microsoft database. After link the database, the programming for add and save onto database mustbe made to ensure all the new detail can be create in the database and the detail can be save in database when the system dig up the detail from database. Also the Programming to ensure the system has capability to store the data in databasecreated. Below is the programming created in this system;
*** Text4.Text = "AT+CMGR" Then
aks1 = Mid(Text3.Text, 34, 12)
aks2 = Mid(Text3.Text, 50, 8)
aks3 = Mid(Text3.Text, 59, 8)
aks4 = Mid(Text3.Text, 73, 5)
aks5 = Mid(Text3.Text, 79, X)
Adodc1.Recordset.AddNew
Text5.Text = aks1
Text6.Text = aks2
Text7.Text = aks3
Text8.Text = aks4
Text11.Text = aks5
Text14.Text = Text8.Text
Text15.Text = Text7.Text
Adodc1.Recordset.Save
Conclusions:
Adodc is component to link the visual basic with the database. The programming will make it run to keep all the data or detail to store in the database created before.
No comments:
Post a Comment