using ado data control
TRANSCRIPT
Objects/controls are connected to ADO Data Control
ADO Data Control is connected to MS Access Database
All information will be save to MS Access Database (Table)
Note: you can only connect all the objects/control IF !you Set-up first the ADO data control.
Important Properties!DatasourceDataField
Important Properties!ConnectionStringVisible
Database1. click file2. click New3. click Blank Database4. type Filename is StudentInfo (name of the database)5. click Create
Table1. click table2. double click create table in design view3. type the fields (do what is given)4. click X or Save button5. type tblStudinfo (the name table)6. click Ok and click NO/Yes (setting the PK)
Converting a Database1. click tools2. click database utilities3. click convert database4. click access 97 format5. click OK
Adding other component in VB61. right click the toolbox2. click/check Microsoft ADO data Control3. click Apply4. click Close
How to set the connection string (connect a database)1. select/click the object Ado Data Control (adodc1)2. go properties, click connection string ....
12. select 2cmdTable13. select the name of the table14. click apply15. click Ok
You have now successfully connect the ADO data control to MS Access database
Connecting other objects (textbox,combobox) to ADO data control1. select/click the object (textbox/combobox)2. go to properties window then click categories3. click DataSource and select the ADO data control (Adodc1-you can change this name)4. click DataField and select the field assigned of the object/control(textbox/combobox)
ex. lastname - lname5.do the same step in step4 with the other objects needs to connect to your ADO data Control
...you are now successfully connect the objects to your ADO Data Control...
Inserting a code1. double click each command button with the corresponding codes shown (code window)