We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,731 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

can we connect VB 6 wtih databases in Ms Office Access 2003?

ai..
i have try alot of times connecting the database in Ms Office Access 2003 with VB 6. bUT there is error when i try to connect between "record source" in vb with data that i save.Can anyone help me and give me some advise,references or way to solve this prob.Plz..I reallly appreciate.Thanx

10
Contributors
12
Replies
4 Years
Discussion Span
3 Years Ago
Last Updated
13
Views
Question
Answered
an_nurif83
Newbie Poster
3 posts since May 2005
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Here is a fantastic tutorial covering the use of ADO with Visual Basic.... This should help quite a bit:
http://www.timesheetsmts.com/adotutorial.htm

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 26

hello there,
as far as i know vb6 can only manage access 97 file formats.
so if you wanna get access to your database you should convert it into access 97 file format.
to do that go to Tools >> Database Utilities >> Convert Database >> To Access 97 file Format .after that you will not be able to modify your database.
i am not sure if you have already done that , but i hope this helps.
hatem..

hatem
Newbie Poster
4 posts since Jun 2005
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

Ok First off:

http://www.microsoft.com/downloads/details.aspx?FamilyID=6C050FE3-C795-4B7D-B037-185D0506396C&displaylang=en


Second..
Add these librarys in your project
Microsoft Activex Data Objects Recordset 2.7 Library
Microsoft Activex Data Objects 2.7

And finally..

http://support.microsoft.com/default.aspx?scid=kb;en-us;238401

techniner
Posting Pro
527 posts since May 2005
Reputation Points: 12
Solved Threads: 19
Skill Endorsements: 0

You HAVE to convert the database file to a 97 format. Vb6 was written when office 97 was out so they only desgined it to be compatible with 97 format. When you convert you canoot edit the file. You'll have to edit it in 2003 then convert it again. Best to use the visual data tool in vb or get a copy of office 97.

thomas49th
Newbie Poster
2 posts since Jun 2005
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

Why not just do this in sql?

techniner
Posting Pro
527 posts since May 2005
Reputation Points: 12
Solved Threads: 19
Skill Endorsements: 0

Service pack 6 would fix this problem and add the libraries techniner said. You do not need to change the format to 97. The access 2003 default database is created as an access 2000 database anyway.

jwshepherd
Junior Poster
123 posts since Jun 2005
Reputation Points: 20
Solved Threads: 5
Skill Endorsements: 0

I rest my case.... :cheesy:

techniner
Posting Pro
527 posts since May 2005
Reputation Points: 12
Solved Threads: 19
Skill Endorsements: 0

I hope this is not too late.
VB6 (and even VB5) can work with Access 2000 and 2003 databases using either ADO or DAO object. For ADO, just specify Jet 4.0 as a prvider:

Provider = Microsoft.Jet.OLEDB.4.0;

With DAO it is something different. VB5 and VB6 use MS Jet 3.5 and DAO 3.51, and for Access 2003 and 2000 you need DAO 3.6 and MS Jet 4.0.
So, if you do not have MS Jet 4.0 installed on your computer, you should download it form http://support.microsoft.com/?kbid=829558

Then in your VB project open menu Project->References
Then turn off the Microsoft DAO 3.51 Object Library (if checked) and
Check (turn on) the Microsoft DAO 3.6 Object Library.

And that's all. Now your project will work with Access 2000 and 2003 databases using DAO object.

I hope this helps.

BR,
Faik

Faik
Newbie Poster
4 posts since Oct 2006
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0
Question Answered as of 6 Years Ago by techniner, Comatose, hatem and 3 others

Yup. VB6 has also the ability to use the "createobject" function for late binding of objects. Which basically means, that any program (including office 2k / 2003) that has a public base class IS ACCESSIBLE from vb6.....

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 26

ai..
i have try a lot of times connecting the database in Ms Office Access 2003 with VB 6. but there is error when i try to connect between "record source" in vb with data that i save.Can anyone help me and give me some advise,references or way to solve this prob.Plz..I reallly appreciate.Thanks

vnanthan
Newbie Poster
1 post since Jan 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

How you are connecting to database ?

through code or by setting properties only ?

please mention the error code and error message for further assistance.

debasisdas
Posting Genius
6,968 posts since Feb 2007
Reputation Points: 722
Solved Threads: 457
Skill Endorsements: 20
vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 298
Skill Endorsements: 3

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0952 seconds using 2.67MB