Access 2007 and VB6 (1 Viewer)

quinita

New member
Local time
Today, 06:44
Joined
Mar 22, 2011
Messages
4
Hello to all of you
I have to create a program in visual basic 6 using an access database 2007.
For that I’m using the DAO control but when I try to set the database RecordSource field I get an error message saying that it doesn`t recognize the database format “xxx.accdb”. I tried to use an access 2003 version I get the same error doesn`t recognize the database format “xxx.mdb”.
I also can’t activate controls/components to vb6. I’m using the access database 2007 in Microsoft Windows XP 2002 version service pack 3 with a Visual basic 6 service pack 3.
Can anyone help please?
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 21:44
Joined
Aug 30, 2003
Messages
36,131
I recall having that trouble with a VB6 app when I started using 2007. I got past it by using ADO instead of DAO:

rsAccess.ActiveConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & g_sServerPath & ";Persist Security Info=False;"

g_sServerPath contains the path to the desired file.
 

quinita

New member
Local time
Today, 06:44
Joined
Mar 22, 2011
Messages
4
I recall having that trouble with a VB6 app when I started using 2007. I got past it by using ADO instead of DAO:

rsAccess.ActiveConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & g_sServerPath & ";Persist Security Info=False;"

g_sServerPath contains the path to the desired file.

Thanks pbaldy

It worked fine with ADO
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 21:44
Joined
Aug 30, 2003
Messages
36,131
No problem, and welcome to the site by the way! There may be a DAO solution, but being lazy I stopped trying when I got the ADO to work. :p
 

Users who are viewing this thread

Top Bottom