Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Connect MS Access 2007 Database To VB6

Dear All,

I tried to connect to Access 2007 database with Microsoft ActiveX Data Object 2.8 in VB6. But error 'unrecognized database format'.

How to connect?

Thanks in advance

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
2007 Access Database
I have a 2007 access database that I need to share between three users simultaneously and updated accordingly. I have loaded the database on a remote exchange server and created shortcuts on the entire three users desktop. However, when more that one user is accessing the database our software crashes… can anyone help me out with this please!

VB6 Is Unable To Find Access 2007 Database Using ADO
I'm using VB6 with an ADO connection string to open an Access 2007 database.

The database was upgraded from an Access 2000 DB to an Access 2007 DB with the new file extension of aacdb.

The original code to open the Access 2000 database was as follows:

sCNString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:ClientsDatabases9999-999-99 CRCCoreDB.MDB;Persist Security Info=False;"

gcnDB.Open sCNString

This worked fine with the Access 2000 DB.

When I changed the connection string for the Access 2007 database it reads as follows:

sCNString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:Databases9999-999-99 CRCCoreDB.aacdb;Persist Security Info=False;"

gcnDB.Open sCNString

The code won't open a connection to the new Access 2007 database. It returns the run-time error: 'Could not find file 'C:Databases9999-999-99 CRCCoreDB.aacdb'

Can anyone help me with this problem?

How To Open/Read An Access 2007 (accdb) From Excel 2007
Hi All,

My company is moving to Office 2007. I am going through several hundred macros written in Excel 2003 to make sure they work in 2007.
I am trying to open and read an Access 2007 database (extension .accdb) from within Excel VBA.
What used to work was this:

Dim dbLocal as Database
Set dbLocal = Workspaces(0).OpenDatabase("C:MyDatabase.mdb")
When I run this under 2007 and change the Access database extension to .accdb, I get this error:


Run TIme Error 3343
Unrecognized Database Format

I've tried adding extra References in, but no luck. Any help would be greatly appreciated.



Importing A Date Function From Excel 2007 To Access 2007
hi, I have a major project ahead of me, I am creating a Dbase full of maintenance records in Access 2007. This Dbase is supposed to be able to calendarise routine maintenance and also on-the-spot maintenance so that all our vehicles don't miss out on it. Is it necessary to link Access with Excel so that each time maintenance is performed, Excel tells Access when it needs to be done next time, or is there another way that's much simpler only using Access 2007? I'm new to Access and Visual Basic so simplest explanations are best...thanks in advance.

Compact On Close, Access 2007, Multiple Database.mdb
Greetings, all.

I've just discovered that Access 2007 creates multiple copies of Database[n].mdb while doing 'Compact on close'.

Our application (designed in XP) uses backend MDB and frontend MDE, both has 'Compact on close' on.
When I open one of them in 2007, then close it, Database.mdb appears in the same folder.

How do I fix it? (Tried turning the feature off, then turn it back on - didn't work).


Making mistakes is one of the ways of improvement.
GL and HF

How To Connect To An Access Database?

I have an access database (.mdb) and i'm trying to connect at it, haven't found a way to make it work

Does anyone know how to connect to an access database, how to get record and how to insert a record? (I know SQL language so you don't need to explain it =) I only need to know how to connect and create recorsets etc...)

Thanks alot

How To Connect Ms Access Database With....
Hi everyone

I have Ms Access database which is password protected. I want to connect this with data report using code.

Please what where i have to code.

Please help me

Waiting for reply.

Thanx in advance.

How To Connect From ASP.NET To An ACCESS Database?
Hi all,

I am trying to connect an ASP.NET application to a MS Access database using SQLConnection class. It is not working and I think it is only for use with SQL server.

Does anybody know how to connect to an Access db and can you explain what I should put in the connection String (my db file is mydb.mdb)?

Thnx in advance


Connect To Access 97 Database W/ VB3 Pro
Hi gang,
Is there anyway I can connect to a table created in the above version of Access? I'm trying to connect via the data control and it says that the database is corrupted or is not an Access database.
Any idea?
Thanks much

Cant Connect To Access Database
Hi all,
I am trying to connect my VB6.0 application to access database

programmatically but am not able to do so... i dont want to do it by usin

Datacontrol or adodc control but programmatically ....also i will be usin

this application in network .. so plz suggest me what to do..

Thanks in Advance

How To Connect My Database Access
i have computer A & B. in computer A i use be a server.
i have my vb program in computer A. i set my adodc connected to my access database using adodc.
in computer b i set my adodc to adodc in computer a but every i update data there a message error : operation must use an updatable query.
 what must ido?

How To Connect To A Web Database (Access)
I'm using VB5 and I'd like to know how to connect to an Access database on the web and be able to delete info from any tables.


How Can I Connect To My Access Database?
I have a database on my site on
Can I connect to the database with application on VB 6.0?

Thank you.

Connect To MS Access *.mdb Database
I’m writing a smart device application by VB.Net. But I’m new in VB.Net.

How can connect with my Ms Access *.mdb database in smart device application?


Connect To Access Database
How do I connect to an Access database and retrieve records from it with using the IIS 4.0. The Code is being written in Visual
Basic 6.0 No password is being used for now.

Connect To A Remote MS-ACCESS Database
I have an access database that has shipping information (invoice#, customer name, USPS tracking #). I created an ASP to query the database and that works fine. On the other hand, I have a VB application that updates the tracking information (along with some other data) into my accounting software.

The point is that I would like to modify the VB (VB 6) to also update the remote database with the last invoices shipped. I've spent about 2-3 hours trying to look for the proper ado connection string, but I'm not sure I found it. Can anybody point me in the right direction? Any help would be greatly appreciated.

So far, this is what I have:
I created a sample project that connects to the database using the ADO Data Control. I was able to open the database & table (Tracking) but I get an error when I use the .AddNew method.

Is this the best way of doing, should I deal with the error or is there a better way of doing it.

Connect To Access Database On The Internet
I wanted to ask why the following code keeps giving me an error:

'Get the records from the database
Dim rs As ADOR.Recordset
Set rs = New ADOR.Recordset

but I see that there are a number of posts at this site from people having the exact same problem, and no one seems able to answer the question why we can't connect to an Access database over the internet.

Is it impossible to do this??????

Can Anyone Tell Me How To Connect To Remote Access Database
i'm using vb6 , and access databse for database ,
i want to connect to remote access database on the server
but i don't know how, i think there is some setting in odbc or what?
here is the code i use
.Open "Provider=MS Remote;" & _
"Remote Server=http://info;" & _
"Remote Provider=MSDASQL;" & _
"DSN=ourdatabasenew6;" & _
"Uid=admin;" & _
is it correct?
or this is correct?
.ConnectionString = "Provider=MS Remote;Remote Server=http://myServerName;Remote Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:somepathmydb.mdb" '"admin", ""

i tried this 2 codes but didn't work , i think there is some problem in setting in odbc .
thank you

Trying To Connect To A Access Database With Password
I am trying to connect to acsess database with vb .net. Everthing works great until I protect the database with a password. And I am using the Data Adapter Configuration Wizard. I put the password and click at the Test connction button. This message appear:
"Unable to connect to database.
It is not possible to begin the application. Lack the file of information of the work group or it is open the exclusive way for other user."
By the way, the database is closed.

How Can I Connect To An ORACLE Database From Access?
I need to know how can I set up access to read an oracle database

Connect To Access Database Dynamically
Hello everyone

I want to be able to connect my VB6.0 program to my Access 2003 database dynamically but I cannot. I can hard code the .databasename and .recordsource properties of my data1 object in the property window but when I clear those 2 fields in the properties window and then go into the code and try to connect to my database using the App.path and then my database name (database in same folder as program) and then do my .recordsource as the table it will never load.
Does anyone know how to get this to work or can you not conenct dynamically to an Access 2003 database using code

How To Connect To Access Database With OLE Field
Hi all

i am new to programming and am trying to use visual basic 6 to connect to a access database with a OLE field, I can get the visual basic to connect and retrieve field information to all other fields bar the OLE field which I hold different pictures to each record, any help would be much appreciated


Connect With Protected MS Access Database
Hi all,

How can I connect with MS Access Database protected with username and password.

When I try to do so an error occured,

Help needed


Connect To A Access Database On A Webserver???
Is there any way to connect to a Access database that is located on a webserver???

What I want to do is to run a Insert SQL statement against the Access database, but without having to download the database to the local computer and then run the SQL statement, and the upload the database again.....

I can make the program in ASP but prefer not because I want to make the interface in VB. Is there perhaps a way to send variables from VB to a ASP page and then let the ASP page do the actual update on the database??? I need to send a big text field (PM) in that case, can this perhaps be done with just using querystrings???


How To Connect Between Access 2000 Database And VB5 ?
When I am trying to connect between a database of Access 2000 and VB5, I get the error: "unrecognized access/database format"

What to do?

How To Connect VB6.0 (Access Database) Using ODBC
Hello All,

I have to connect to an Access database , db1.mdb from my Visual Basic Code.I created a DSN for .mdb called "fms".When try to connect to this dsn from my code I am getting error.

Can anyone help me to sort out this.


How To Connect Remote Access Database Through Vb
Dear All

How to connect remote ms access database through vb,

thanks in advance

Bhadresh Sangoi
Cell : +91-9892638621
I'm careful not to confuse excellence with perfection.
Excellence, I can reach for; perfection is God's business

How To Connect To A Remote MS-Access Database?
hi friends

i am desiging one applciation in that i need to connect to my company website server in that i will have a MS-Access table.

i have created one DSN for this table in the web server (DSN=STBDSN).

think that i have a website called in that i have DSN called STBDSN this DSN points to the MS-Access file in the server.

so from VB how can i connect to that DSN..

please help for this

thanks in advance.


How To Connect To Remote Access Database Using Vb
hi friends

    how to connect to a remote MSaccess database using vb6.0.

i m having Msaccess database in the remote server i want to connect to the database and need to do operations like create edit and delete and view the recirds.
plz give as a possibilities to connect to a remote server

if u have a sample it will be better.


How Can I Connect A Access Database With Password
I use MS ADO Data Control 6 (OLEDB), I define connectionstring and enter password, but when I want to test connection, I get below message
Test Connection Failed, because of an error in initializing Provider, Can't Start your application , The workgroup information file is missing or open exclusivly by another user
Please help

Failing To Connect With Access Database
The following code:
accessDB = App.Path & "CCCDDatabase.mdb"
pasword = "mypassword"
myDSN = "PROVIDER=Microsoft.Jet.OLEDB.4.0;"
myDSN = myDSN & "DATA SOURCE=" & pathstring & ";"
' the security modification
myDSN = myDSN & "Password=" & password & ";"

was working fine and connecting with the database without problems before I add a password to the database and add the security line to the code

am I adding the password incorrectly?

The error message that shows upon execution says:
Cannot start your application. The workgroup information file is missing or opened exclusively by another user.

While the database is not opened by another user..!!

What could be the possibilties,
the error message is attached

If you haven't the one you love, love the one you have

Edited by - izz on 1/18/2002 10:11:20 AM

Connect Access DB Which Has Database Password
i posted earlier also, but nobody replied
So i am posting it again...
I want to create Database password by openeing 'DB exclusively' for Access Database[that is the only way to set database password in access]. so that others can not manipulate tables.
Then i want to pass that password in ADODB Connection String. I tried but failed. i want help in this problem.
i tried the below one, but not working
dbCCP.CursorLocation = adUseClient
dbCCP.Open "Provider=Microsoft.Jet.OLEDB.3.51;" _
            & " Data Source=\Vol2UsersSreddyPayments.mdb;" _
            & " User Id=admin;Password=pass;"

How to create DB passoword and pass it in connection string with out creating userGroup?
that is my question?

Connect To Password-protected MS Access Database
Dear Friends

I Am the beginner-programmer, working in Vietnam (Small country in South-east Asia)

I have the following problem:

We have the web-page, using ASP, to retreive data from a Access Database (not password protected).

We are also work within a group, each user has their own password to log-in to the database.

Now we try to set the password for the database, but then, the ASP does'nt work.

The code I use is:

Set conn = Server.CreateObject("ADODB.Connection") "MyDB","username","password"
sql = "SELECT * FROM MyTable"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 3, 3
reponse.write "Result: " & rs.fields("Filed_Number_1")

The server return the message of "Not correct username or password" when the password is set. It we do not set the password. it runs OK.

Can you - experts, to help me on that

Thanks a lot


How To Connect To An Access Database Stored On Internet
Hello friends,

i need some help from you. I want to know how can we connect
to an access database store online and run a query on that database.

Consider the following VB code i use to connect to a local database
having name jrem.mdb in the same directory as the exe file.

Dim dbsjreminder As Database
Dim insQuery As String
Dim intRecAffected As Integer

Set dbsjreminder = OpenDatabase("jrem.mdb", True, False, "MS Access;pwd=7tank5stomp")
insQuery = "INSERT into Users (username,password) VALUES ('testnet','netpass');"

dbsjreminder.Execute insQuery, dbFailOnError
intRecAffected = dbsjreminder.RecordsAffected

If intRecAffected = 1 Then
MsgBox "User added to the list", vbOKOnly, "Added"
End If
********************************************************************** **8

What i want to know is how can i connect to the same database if i have the
jrem.mdb file over the internet.

i checked it using the following code to open the database

Set dbsjreminder = OpenDatabase("", True, False, "MS Access;pwd=7tank5stomp")

but it gives an error

Error 3044
"c:my documents
ettest" is not a valid path

please help me how i can connect to the database stored online and run some sql query over that application.
also note that i want to do it in an application itself without the browser being involved.
i want to do it from a VB application itself.

please do let me know as it is urgent.

thank you very much.

How Do I Connect To A Password Protected Access Database?
Hi Every one,
I ve created an application using VB 6.0 SP 5 and using backend as ACCESS XP. It is working all fine. I m using Jet Engine 4 to connect. Now I want to upgrade my database. I made it password protected. After that i have set the same password in my ADODC controls and changed the connection string property. But still it is not able to access the database. It gives some Data link error. If any one has experienced such kind of problems before then please do help me.

Thanks A Lot...


How To Connect Remote System Using MS Access DataBase

How to connect remote system using MS Access DataBase.

I used this connection string ,

conn = "Provider=MS Remote;Remote Server=;Remote Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Inmacs.mdb;Persist Security Info=False"

conn is opening , but in login screen when i click login button i am getting this error "Can't Connect to Server"


Connect To MS Access Database On Remote Computer

I'm trying to connect MS Access database which is on the Remote Computer.

I've written this code. While opening connection ("No Error") but if I try to select or insert records ("Run-time error '4100' Business object cannot be created.)

Plz suggest :-

VB Code:
Dim MyConn As ADODB.Connection    Set MyConn = New ADODB.Connection     MyConn.Open "Provider=MS Remote;" & _                "Remote Server=server;" & _                "Remote Provider=Microsoft.Jet.OLEDB.4.0;" & _                "Data Source=" & App.Path & "StatusReport.mdb;" & _                "Persist Security Info=False"        MyConn.CursorLocation = adUseClient     MsgBox "Connectin OK"    SQL = "Insert Into Testing(abc) Values('Manoj')"    MyConn.Execute SQL                                        'ERROR HERE    MsgBox "Insertion OK"


"File Name=MyFileName;"

VB Code:
MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _                "File Name=MyFile;" & _                "Remote Provider=Microsoft.Jet.OLEDB.4.0;" & _                "Remote Server=\server;" & _                "Data Source=& App.Path & " StatusReport.mdb;" & _                "Persist Security Info=False"

I don't know how to get it done. Plz suggest a solution.

Thanks & Regards

How To Use MS-Access Connect SQL7 Database Server
How to use MS-Access connect SQL7 database . tks

How To Connect Remote System Using MS Access DataBase

  How to connect remote system using MS Access DataBase.

 I used this connection string ,

    conn = "Provider=MS Remote;Remote Server=;Remote Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Inmacs.mdb;Persist Security Info=False"

conn is opening , but in login screen when i click login button i am getting this error "Can't Connect to Server"


Please do not double post:PROBLEM:
You posted the same question at view topic #144723
Please read the: Posting Guidelines Item 2.
It won't increase but rather decrease your chance to get help.
If you make a mistake with your post, you can always edit it!

Edited by - rock on 5/9/2007 1:57:06 AM

How To Connect MS Access Database With Report Using Code
Hi everyone

I have Ms Access database which is password protected. I want to connect this with data report using code.

Please what where i have to code.

Please help me

Waiting for reply.

Thanx in advance.

How To Connect Remote System Using MS Access DataBase

  How to connect remote system using MS Access DataBase.

 I used this connection string ,

    conn = "Provider=MS Remote;Remote Server=;Remote Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Inmacs.mdb;Persist Security Info=False"

conn is opening , but in login screen when i click login button i am getting this error "Can't Connect to Server"


Can't Connect To Access Database When I Used Data With Password
I set connection with ADODB.Connection
Dim Con As ADODB.Connection
Set Con = New ADODB.Connection
Con.Provider = "Microsoft.Jet.OLEDB.4.0"
Con.Open "datapathDataBaseName.mdb", UserName, Password
when i run the program, and then show up an error:
Run-time error '-2147217843 (80040e4d)':

Cannot start your application. The workgroup information file is missing or opened exclusively by another user.
what's wrong with my program or database?

Would anybody help me?


ACCESS Using ODBC To Connect To The MYSQL Database
Hai all,
I need some help regarding this, 'creating voting system'.i have created login screen and database using seems i have to use 'lock' and 'unlock's to get concurrency.Please go through this,ACCESS using ODBC to connect to the MYSQL database.
           A voter must supply a correct user name (login) and password before being allowed to vote. A voter is only allowed to vote once. When a voter votes, his vote should be recorded in such a way that no one can determine the way a voter voted.
             program should be multiple user in that more than one person can vote at a time. Measures need to be taken to make sure the no. of votes counted is correct. To test program, it should be loaded on at least 2 different computers and both tested at the same time.Please help me for code..... Thankyou in advance

How To Connect A Access Report To A SQL Database Without Using Linked Tables
Hi Guys

I have to convert a Access database to connection to SQL directly without using Linked tables.

I have managed to create recordsets that connect to SQL and retrieve the data I want.

I then reference the results in the RecordSource field of the report but the report is defaulting to the access database to fetch the stored proc. How do I refer the report to the SQL database.

Please, any help would be appreciated.


How To Connect A Secure Access Database Through The Data Environment????
I have a hard time to connect a secure (workgroup) database with my vb application through Data Environment. I know how to connect through code, just want to learn more about the DE. Thanks!

VB5 Application Can't Connect To Password-protected Access Database
This question concerns the same scenario described in my previous question (subject "VB5 connecting to MS Access 2003"). I am writing a VB5 application that connects to an Access database.

The problem is this. I want to place a password on the .mdb file because it contains sensitive client data. I don't want anybody to be able to gain access to it by double-clicking on it. But when I do this, my application can't connect to it.

Taking into account the information described in my previous question (that is, the fact that I'm using a Data Access Object pasted onto my form), how do I tell my application what the .mdb file's password is so that it can connect to it?

Thanks again for your help.

How To Connect To Access Database Progranetically In Visual Basic 2005
In visual basic 6, i used
public conn as ADODB.connection
and other codes to connect and access database.

But, i dont find how to use to connect and access data from access database in a way that i can create sql in runtime and execute like i used to do in VB
set rs=conn.Execute(sql)
where rs is an object of recordset and conn is object of connection under ADODB, and sql is string.

Please, anyone help me. I am stuck with this problem

Connect To Database Visual Basic (Link Tables) Ms Access
Does anyone know how you can automatically connect to a back-end database (link tables) via visual basic. If there is no working connection I want to make the connection in visual basic The location of the back-end must be stored in visual basic.
What I mean with link tables is connect from a frontend database (Access) to a backend database (access) in visual basic. For the front end database it should look like the tables are in de front end hisself. So it must be able that the standard querys (access, not visual basic) work.

Greetings, Roel Frissen

Database Connect() Failed: Server Doesnot Exists Or Access Denied

I am facing a problem relate dto database access. On Form looad i am calling GetConnect function as given below, but above mentioned problem is coming.

How to overcome this and where to look for correcting this?


Copyright © 2005-08, All rights reserved