VB.Net 2010 Express and Access database on 64 bit vista RRS feed

  • Question

  • I posted this as a bug on MS Connect and am wondering if anybody else can verify the problem:

    I been beating my head against the wall for about 3 days and I don't think it is my problem.

    Desktop computer - Vista 64 bit
    Portable Computer - Vista 32 bit

    vb.net 2010 express on both of them

    I can not establish a connection to an Access db (either .mdb OR .accdb) on the 64 bit computer.  When I try I keep getting a message that says "Format at the initialization string does not conform to specification starting at index 0." (this was typed not copied).  (There are screen shots over on Connect).

    I can establish a connection to a "Microsoft SQL Server Compact Edition" (.sdf) database on the 64 bit computer.

    I can estabish a connection to all 3 types on the 32 bit computer (.sdf, .mdb, .accdb).

    The 'funny' thing is that if I establish the connection on the 32 bit and copy the program directory over to the 64 bit, the prorgam loads and seems to run fine.  But the %$# _(%* Wizard will not run on the 64 bit machine.  Runs fine on the 32 bit but not on the 64 bit.  Of course I make sure that the db's are in the location where the program expects them to be when I run the program on the 64 bit machine.

    One final thing, when I am in the progam created on the 32 bit and running on the 64 bit and I try Data->Add New Data Source->Database->Dataset only two of the three connections show up while all 3 show up on the 32 bit machine. Also the connection string is incorrect for the non-sdf connection. It should include .....Jet.... info.


    Tuesday, May 22, 2012 4:45 AM


  • Thanks everybody who looked at this:

    Everything seems to work off of a cold boot (I'm so old I remember when that made a difference).

    Have a GREAT Memorial Day weekend,


    • Marked as answer by blheems Friday, May 25, 2012 9:35 PM
    Friday, May 25, 2012 9:34 PM

All replies

  • Oh BTW - it seems the ONLY target compile that vb 2010 express will give me on the 64 bit machine is x86.  There is no choice on the 32 bit machine (the drop down box does not even appear on the screen).  So the Jet drivers should (and seem to) run.  Yes, all the updates have been done.  I have even downloaded the 'Ace' drivers but I can not seem to reference them/it/him/her either.

    Tuesday, May 22, 2012 6:03 AM
  • A couple more things this morning.

    I looked and it does use the Ace driver.  I did a search and found some info in the App.config file.  The three connections are described below.  Remember these were established on the 32 bit machine copied over and are being used on the 64 bit machine.

    NWIND.MDB (from an earlier Office maybe 1997) uses the Jet driver.

    Northwind 2007.accdb (from Office 2007) uses the Ace driver.

    Northwind.sdf (from SQL something) uses the "Microsoft.SqlServerCe.Client.3.5" driver.

    I, also, put a second form in the project and can seem to drag and drop from all three data sources just fine and it fills up a data grid with info from all three Databases (or DataSets whatever you want to call them) when I run the program.  But do I really trust it?  And what is going to happen when I change the 'schema' in some way?  Add a Table or change a Field definition, etc.

    Finally, one of the threads said to open up the project file and add a line:


    but I tried that and it did not seem to change anything.  The problem is not with target platform anyway it is in the development environment.  It just will not run the Data Source Configuration Wizard to establish a new connection to anything but a .sdf database.

    Tuesday, May 22, 2012 3:38 PM
  • Just an FYI, you should be able to add the Platform option if it does not appear in the drop down. Just click on <New...> in the drop down. If you are looking to support both 32 and 64-bit then selection of "Any CPU" would be appropriate. In the case of Jet OLEDB, the only Platform option that will allow it work in both environments is x86.

    The "Format at the initialization string..." error is usually any indication that the connection string syntax is incorrect. Assuming that you are using the .NET OLEDB library, we would need to see the actual connection string to verify.

    Paul ~~~~ Microsoft MVP (Visual Basic)

    • Proposed as answer by Mark Liu-lxf Wednesday, May 23, 2012 4:48 AM
    Tuesday, May 22, 2012 4:30 PM
  • Thanks for thinking about this.

    You don't quite understand my problem yet.  The application runs in the IDE on both 32 and 64 bit systems.  It uses Jet to connect to the .mdb database so, yes, the applicaton is running in 32 bit mode.  And, yes again, the connection strings must be OK for it to run.  Remember these connection strings were created on the 32 bit machine.

    I just published it and it installed and runs stand alone.  Seems to connect to the databases, it is on the start menu, and control panel to remove; so everything there is good.

    My problem is trying to use what is called the 'Data Source Configuration' Wizard inside the IDE on the 64 bit machine.  You get there by Data->Add New Data Source->Database->Dataset->New Connection->Microsoft Access Database File->OK->OK CRASH

    So it does not get to the point of putting the configuration string into the application on the 64 bit machine.  This Wizard works fine on the 32 bit machine.

    Look at the screen shot from the 64 bit machine I provide on Connect for clarification if you want (Details Trouble1.jpg):


    On that screen shot, if you look at the 'Data Sources' window and the 'Solution Explorer' window the data sets are there and everything is good.  UNTIL you try and add a new connection using the Wizard on the 64 bit machine.

    This is the App.Config file that the 32 bit machine developed.  But again, the problem is not here (I don't think):

    <?xml version="1.0" encoding="utf-8" ?>
            <add name="dbTry.My.MySettings.NWINDConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\dbTest\NWIND.MDB"
                providerName="System.Data.OleDb" />
            <add name="dbTry.My.MySettings.Northwind_2007ConnectionString"
                connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=&quot;C:\dbTest\Northwind 2007.accdb&quot;"
                providerName="System.Data.OleDb" />
            <add name="dbTry.My.MySettings.NorthwindConnectionString" connectionString="Data Source=C:\dbTest\Northwind.sdf"
                providerName="Microsoft.SqlServerCe.Client.3.5" />
            <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client" />

    • Edited by blheems Tuesday, May 22, 2012 7:47 PM
    Tuesday, May 22, 2012 7:41 PM
  • Hi blheems,

    Welcome to the MSDN forum.

    As far as I know, there is no 64bit Jet provides for you. If you want to use the Jet on the machine, you need to keep the target to X86.

    If the error also caused in ACE, the issue can be caused by the connect Engine in 64bit machine. It seems that the access database Engine (Microsoft.ACE.OLEDB.12) in Data Source Configuration Wizard failed to work in the 64bit machine. At the same time, there is no 64bit Jet provides for you. Would you like to provide the more information about the Access database you installed in the 64bit machine? Which is the version of Office, 64bit editions or 32bit editions? You need to instill the correct version of access database Engine to the 64bit machine, here is link: http://www.microsoft.com/en-us/download/details.aspx?id=13255

    Here is some relation information, please check it:

    FAQ Item: Solution fails on 64 bit system with error “Microsoft.Jet.OLEDB.4.0 provider is not registered on the local machine” and “Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine”.: http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/b5a79958-5bce-4229-a69f-75589b6240a8

    The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.: http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/cfb9efe8-4de2-40b6-b817-553c91b9f9c6

    Hope this helps.

    Mark Liu-lxf [MSFT]
    MSDN Community Support | Feedback to us

    • Edited by Mark Liu-lxf Wednesday, May 23, 2012 5:59 AM
    • Proposed as answer by Renee Culver Wednesday, May 23, 2012 8:12 AM
    Wednesday, May 23, 2012 5:49 AM
  • I tried it for you in VBExpress, not any problem

    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\nwindAcc.accdb


    Wednesday, May 23, 2012 6:18 AM
  • Thanks everybody for thinking about this.

    I am using Office 2007 Professional on both machines.  Vista Home Premium on both machines (one 64 bit one 32 bit).  I am running to an x86 compile.  I am sure the drivers are OK and the application loads data on both machines so the connection strings are OK.  Remember these data connetions were created on the 32 bit and the entire solution folder copied over to the 64 bit.  And it runs OK on both.

    I was playing around with both systems tonight and when I try and make a new connection it takes me to a different 'Add Connection' form on each system.  This form is the one where it crashes on the 64 bit. 

    I can get to this baaaad place using the 'Data Source Connection' Wizard or (I just figured out) get there starting in the 'Database Explorer' window.  From the 'Database Explorer' window click the 'Connect to Database' button -> (pops open 'Add Connection' form) Change -> (pops open the 'Change Data Source' form)  Double click 'Access Database File' to select -> WHAM it takes you to a different place on the two systems.

    Both systems have a different 'Add Connection' form than the one that was up earlier.  And the forms are not the same on the two systems.  So there are at least 3 forms that show 'Add Connection' as the title.  The 2nd 'Add Connection' form on the 64 bit leads to a hang, the 2nd 'Add Connection' form on the 32 bit works.

    I posted screen shots over on Connect if you want to see the two forms.


    Thanks again,


    • Edited by blheems Wednesday, May 23, 2012 8:19 AM
    Wednesday, May 23, 2012 8:16 AM
  • I can't repro this issue on a 64-bit Windows 7 machine. If you create a new project on the 64-bit Vista machine do you encounter any issues with the Data Source Configuration Wizard, or does the problem only occur with the existing project?

    Paul ~~~~ Microsoft MVP (Visual Basic)

    Wednesday, May 23, 2012 12:22 PM
  • Thanks again.

    EVERY TIME on the 64 bit machine.  I have NEVER been able to set up a new Access data source on the 64 bit machine.  New projects, old projects, projects with existing Access Data Sources set up on the 32 bit machine, projects without existing Access data source; ALL take me to (what I am assuming is) the wrong form when I am trying to set up a new Access Data Source.

    Note - I just tried and succeeded in adding a .mdf database on the 64 bit machine.  So I can do .sdf and .mdf; can NOT do .mdb and .accdb.

    I pretty well have it trapped down to (what I would imagine is) a Select Case block. 

    When you try and add a New Data Source it pops up an 'Add Connection' form.  When you select 'Change' it pops up a second form titled 'Change Data Source'.  It is the return from that 'Change Data Source' form when you select 'Microsoft Access Database File' that is branching incorrectly on the 64 bit machine.

    If I only had the source..........


    Wednesday, May 23, 2012 3:18 PM
  • I knew this sounded familiar. See if anything in the below forum thread helps:


    Paul ~~~~ Microsoft MVP (Visual Basic)

    Wednesday, May 23, 2012 5:26 PM
  • Thanks again.

    No joy.  I'd seen most of that before.  The regedits one was new but didn't do anything for me.  Both good news and bad that others are having the same problem and have been for a long time.

    I tried the adding an Access database connection in Visual C# 2010 Express and had the same problem.  So the problem is really with Visual Studio and not specific to Visual Basic.

    I spent the last 3 hours uninstalling EVERYTHING (except the SQL stuff) and reinstalling.  Still no joy.

    Tried the new user thing.  No joy.

    Of course attaching the db through code works, but then I don't have the drag and drop for controls, etc.

    How about a different method?  The info contained in the Database Explorer window MUST BE somewhere.  Is there any way to get the db into Database Explorer without using the Wizard?



    Thursday, May 24, 2012 1:38 AM
  • Hi,

    Search both machines for ACEOLEDB.DLL. Where are these located (full path) and what is the version of each?


    Cathy Miller

    Thursday, May 24, 2012 8:31 PM
  • Thanks for looking at this:

    I had some typos in here that I cleaned up later - so any comments about this - they are right and I am wrong!

    On the 32 bit machine where everything works (this is all typed not copied):

    2 cabs that I won't bother to list.

    C:\Program Files\Common Files\microsoft shared\Office12\ACEOLEDB.DLL

    dated 7/27/2011 4:41 AM

    File version: 12.0.6606.1000


    On the 64 bit machine that is having the trouble:

    1 cab that I won't bother to list.

    2 copies of the .dll with one the same (except in Program Files (x86) folder) as the 32 bit machine and the second one:

    C:\Program Files (x86)\Common Files\microsoft shared\Office14\ACEOLEDB.DLL

    dated 3/23/2010 10:55 AM

    File version: 14.0.4760.1000


    I don't know where the Office14 copy came from since I do not have Office 2010 installed.  If you need more info, please post.

    Note - I temporarily renamed the .DLL in Office14 (which is the older one but with a higher version number ?????) and rebooted the computer and tried it out.  No joy.

    Thanks again,


    • Edited by blheems Friday, May 25, 2012 7:09 PM
    Thursday, May 24, 2012 10:09 PM
  • Hi Brian,

    You mentioned the file on the 32 bit machine is in the Program Files (x86) path, which should not exist on a 32 bit machine. Please verify whether the ACEOLEDB.DLL(s) you found on the 64 bit machine are in the Program Files path or the Program Files (x86) path.

    When you renamed the one in the Office14 folder, was the symptom the same exactly? Did the application continue to run fine outside of Visual Studio afterwards?

    Check Control Panel => Programs and Features to see if you have the Microsoft Access Database Engine installed. Perhaps you have that and Office 2007 installed.

    Is your Office 2007 installation working fine? If you have Access itself installed, does it run and open the same database your application is using?

    You may want to try using Process Monitor to help diagnose the problem. You can download it from the following link:


    Close Visual Studio and reopen it while Process Monitor is running. Then, reproduce the error and stop Process Monitor. Then filter the output by the devenv.exe process.

    You could then do the same thing while running the application outside of Visual Studio, with the Process Monitor filtered for the name of your executable, to compare.


    Cathy Miller

    Friday, May 25, 2012 1:45 PM
  • Thanks again:

    Yes you are correct about the folder on the 32bit - sorry.  There was also an extra ')' in the paths.  I edited that out so anybody reading this later wouldn't run into the same thing.  My bad.

    Both the .dll's are in the Program Files (x86) path on the 64 bit.

    Everything is the same after renaming the one dll.  I will leave it renamed until I run into any different problems.

    Yes, the Access database engine 2010 is installed (must have been updated huh?)  I have not had any Access specific problems.  BTW - there is also a copy of Office 97 Professional on this computer that I can not seem to remove.  I need the installation disk and I can't find it.  I've looked.

    Now to the process monitor:

    I take it you ment 'vbexpress.exe' not 'devenv.exe'  I can't find any process under the 'devenv.exe' name.  It seems to have problems with this type of thing:

    RegOpenKey,HKLM\SOFTWARE\Wow6432Node\Microsoft\CTF\KnownClasses,NAME NOT FOUND

    I uploaded some picture so we can be sure that we are on the same page (hope this works).  Both systems get to here the same:


    When I select 'Microsoft Access database File' the 32 bit system takes me here:


    and the 64 bit system takes me here:


    which always results in:


    So I can not reference a new Access database (either .mdb or .accdb) on the 64 bit machine.

    Thanks again,


    • Edited by blheems Friday, May 25, 2012 8:17 PM
    Friday, May 25, 2012 7:36 PM
  • Hi Brian,

    Take a look at this thread and tell me your results from steps 1, 2 and 3 under 'to examine the registry' in the Answer post:


    Since you are on a 64 bit machine, follow the 'to examine the registry' steps for the registry key mentioned in the post, and also:


    Unless you are very comfortable making registry changes, you should back it up first:




    Friday, May 25, 2012 8:13 PM
  • Thanks again.

    The first one:


    is described in a link up above.  It is seems OK.

    The second one :


    Prog_ID is not set.

    I take it you want me to put 'MSIDXS.1' for the value under ProgID into the second one.

    And the result is:

    Happy days are here again
    The skies above are clear again
    So let's sing a song of cheer again
    Happy days are here again

    I haven't rebooted yet.  I have a bunch of stuff to close up.  That is next but so far so good.

    Thanks and have a good weekend,


    Friday, May 25, 2012 9:11 PM
  • Thanks everybody who looked at this:

    Everything seems to work off of a cold boot (I'm so old I remember when that made a difference).

    Have a GREAT Memorial Day weekend,


    • Marked as answer by blheems Friday, May 25, 2012 9:35 PM
    Friday, May 25, 2012 9:34 PM