Format of the initialization string does not conform to specification starting at index 0.


  • Help!!! I have been trying to access "Access"...  Using the Data Source Configuration Wizard to set up a "New Connection". Select _
    Microsoft Access Database File (OLE DB) and... The "Add Connection" dialog pops up however it lists only the Data source, Change _
    button, and a Misc catagory called ConnectionString. Which is blank. There is the Test button which succeedes everytime with no info.
    But if I hit that "Ok" button "format of the initialization string does not conform to specification starting at index 0" and thats it... Help!!!

    Im using vb2008 Pro and had no problems with this Database creation in a 32bit environment on my other (slow) system.
    Now I have a 64 bit quad core 8 gigs ram... hope thats not the problem...
    I have tried the "regFixes" including the ProgID, which was missing...  However I am still experiencing this problem creating a Database...

    Help!!! I only have one more hair on my head to pull out!!!
    Wednesday, October 28, 2009 8:12 PM


All replies

  • Did you click on the Change button so that you can select Microsoft Access Database File from the list. Once you do that you will see all of the settings for this type of data source in the Add Connection dialog.

    Also, keep in mind that if you run your application on a 64-bit system you will need to compile it with the x86 (32-bit) option. The reason for this is that Microsoft Access does not currently have a 64-bit driver so your app must be compiled to run as a 32-bit application (process) in 64-bit WoW (Windows on Windows).
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Thursday, October 29, 2009 12:17 PM
  • Thanks for response. I have tried that, still the same... Microsoft Access Database is selected when I try to create the Database. I have clicked the "Change" button
    only to reselect it from the list again. 

    Thanks also for the info about needing to compile applications with the x86 (32-bit) option.
    Thursday, October 29, 2009 2:32 PM
  • Do you have any bad references in your project? Do you have the same problem if you create a new project?

    I've read that this can cause the Data Source Configuration Wizard to not function properly.

    Paul ~~~~ Microsoft MVP (Visual Basic)
    Thursday, October 29, 2009 4:56 PM
  • Again thanks for response. I am creating a new project when this occurs. It has me baffled. I have read so much about this problem happening since 2006 in posts on forums everywhere.  Did I read a response from Microsoft in another post wrong? Saying something about "MS JET ENGINE" is'nt compatible with MS Access database, and in order to use MS Access he would need to use Microsoft.ACE.OLEDB.12.0. The person has the exact same problem I have and that was the only response he had was one from someone on MS Team. MS recommended that this person download "2007 Office System Driver" AccessDatabaseEngine.exe.  Even so I tried that as well still no database to create.
        Thanks again Paul ~~~~ Microsoft MVP (Visual Basic) for your Help!!!
    • Edited by CYBERTROOPER Thursday, October 29, 2009 10:27 PM edit
    Thursday, October 29, 2009 6:03 PM
  • You may also get this error if there is a single quote in the connection string.
    For example (note the ' after the provider name);

                string cs = @"Provider=Microsoft.Jet.OLEDB.4.0';Data Source=C:\<your location>\<dbfile>.mdb";
                using (OleDbConnection con = new OleDbConnection(cs))

    Will give;

    Unhandled Exception: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0.
       at System.Data.Common.DbConnectionOptions.GetKeyValuePair...

    I know you are using the wizards, but worth mentioning.

    This posting is provided "AS IS" with no warranties.
    Monday, November 02, 2009 8:55 AM


    Welcome to MSDN forums!


    There are some threads discussing the similar issue to yours here, please try these workarounds inside.

    1.    Event log may be full.  Please clear the Application, System, and Security logs.


    2.    Got the problem solved, it is due to a corrupt .cab installation file.


    3.    Try to modify Registry



    Or you can consider connecting to MS Access database in VB.NET code like this:


    Imports System.Data.OleDb  

    'Office 2003  

     Dim con As New OleDbConnection("Provider=Microsoft.jet.oledb.4.0;data source=|DataDirectory|\UserDB.mdb")  

    'Office 2007  

    Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\users.accdb"


    Code sample: Connect and access MS Access database in VB.NET code



    Does this work for you? If you have any questions or concerns, please update the thread and we will have a further discussion.



    Best Regards

    Yichun Feng


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, November 04, 2009 2:39 AM
  • Thanks for the help.. :-)

    I was also suffering from same problem but single quote ( ' ) was included for the database path..\


    <p>string cs = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source='C:\<your location>\<dbfile>.mdb'";</p><p><em>It works fine while development but after deployment it throws exception.</em></p><p>Again thanks for the helpful information</p>
    Saturday, March 29, 2014 1:54 PM