954,559 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Connecting to a access database

Dear Sir,

Let me know how to connect a access database in Visual basic 6.

georgeajcka2009
Newbie Poster
2 posts since Mar 2009
Reputation Points: 10
Solved Threads: 0
 

if you are looking for the connection string please find it here .

debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

you can do it very easily. just put a data control. in properties slelect connection type access (if you want to connect office 2000 or next version you need service pack 6). and select the location of file. and then in record source select the table.

abu taher
Practically a Posting Shark
845 posts since Jul 2008
Reputation Points: 14
Solved Threads: 78
 

There is another way depending upon what version of VB you have.

Start new standard exe project
Goto vb's ide menu Add-Ins > select add-in manager.
Look for VB 6 Data Form Wizard, highlight > Look at frame in bottom right corner with caption Load Behavior > select Loaded/Unloaded so check mark displays in check box. > OK
VB IDE Menu Add-Ins > Data Form Wizard
Run through wizard selecting your access database via browse button on screen 3.
On next form enter the name of the form you want, the style, and the type. I would suggest to start off with the ADO Code unless this is the first time you have ever played with VB.

Actually I would suggest that you use each option with each type and save that as a test project for reference. Then you will have it for reference.

Good Luck

vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
 

Nice post vb5prgrmr - wish I had though of that when I started using access with vb6 lol :)

As for using Access, Comatose posted a sticky in the VB4/5/6 section about this very subject - http://www.daniweb.com/forums/thread41057.html

I think vb5prgrmr's idea would be easier if you're unsure what you're doing though! :)

jonifen
Junior Poster
152 posts since Nov 2007
Reputation Points: 13
Solved Threads: 17
 

thanks

georgeajcka2009
Newbie Poster
2 posts since Mar 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You