Using ADO to Communicate with the Database, Part 1 - Bringing All Together
(Page 4 of 5 )
Now we will be creating a simple Database Enabled form which will allow you add, display, edit, and delete the records. To start with, we will create a simple form which will store the name, address, and telephone number of an employee.
Step-I (Design)
1. Open Visual Basic and Create a New .EXE project and save it as AddBook.Vbp
2. When u will create a project, a form named “Form1.frm” will be added automatically in the project, Change the name of he Form as “frmMyAddrBook.frm”
3. Place Three Label and change the caption to “Name”, “Address” and Teleephone Number” respectively
4. Place Three TextBox on the form and Name it as “txtName”, “txtAddr” and “txtTel”
5. Place a ListBox Control on the form and Name it as lstContact
6. Add some Buttons for Adding, Saving, Deleting andClearing the form and name it “cmdAdd”, “cmdSave”, “cmdDelete” and “cmdClear”
Step-II (Referencing the ADO)
1. Goto Project -> Reference Menu
2. Add reference of the “Microsoft Actiovex Data Object [XX.XX] class
Next: Implementing the Code >>
More Database Code Articles
More By Pradeep Chaudhary