Search code examples
vb6oledbjet

What produces Error 10001 in vb6 at connection string?


After the last Windows/Office update Feb 2020 on some of the computers the following connection string in vb6 produces an

"Catastrophic Failure : (10001)"

ConnectionString = "provider=microsoft.ace.oledb.12.0;DataSource="+cMDBFile

After installing MicrosoftDatabaseEngine2010 (32bit) the error was gone, but only until the next Windows Restart/Windows Update.

After changing to

ConnectionString = "provider=microsoft.jet.oledb.4.0;DataSource="+cMDBFile

it seems to run.

My MDBFile Format is ACCESS2003

The connection is created as follows:

Dim objConn as ADODB.Connection 
Set objConn = new ADODB.Connection 

With objConn 
    .ConnectionString = "provider=microsoft.ace.oledb.12.0;DataSource="+cMDBFile 
    .Open 
End With 

The Error Occurs at .Open.

Does anybody know what happened? The last years no error occurred (except 3420 in December of course). Is this an error produced by Microsoft, if so, how can I tell them?


Solution

  • You connection string should according to your database type.

    more likely when you are connection to mdb file, you should use

    PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=