Wednesday, August 15, 2012

Visual Basic 6.0 part 1 - Database Connection

All we have to do here is only the database connection using Microsoft Access and nothing else. If you already know what it is,skip to other part which makes helpful for you.

1)Open VB6.0 application. Go to project tab and select references. check if  Microsoft  ActiveX Data Objects is selected if not SELECT only one. see the image below
2.)Add module and Save the Project in one folder and lets the coding.
3.)Go to module and code. follow the code see image below


4.)After coding at the module go to Form1 double click and then call the function. Be sure it is coded at the form_load.
5.) After done coding click SAVE and then Run the program. If the msgbox pop-up it means your successfully connected to database
Enjoy :)

Part 2 is SQL Statement, Inserting Information to the database.




No comments:

Post a Comment