02 May 2009
Solution to the “Format of the initialization string does not conform to specification starting at index 0.” Exception
You are probably using the wrong DbConnection class.
If you are using Access then make sure you use OleDbConnection, not SqlConnection…and vice versa.
Alternatively you could be referencing your MDB file wrong. Here’s the proper way:
<connectionStrings>
<add name="Videos" connectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source={0}App_Data\Videos.mdb" providerName="System.Data.OleDb"/>
</connectionStrings>
public static string ConnectionString = string.Format(ConfigurationManager.ConnectionStrings["Videos"].ConnectionString, HttpContext.Current.Server.MapPath("~/"));
Comment Notification
If you would like to receive an email when updates are made to this post, please register here
Subscribe to this post's comments using
Comment Policy: No HTML allowed. URIs and line breaks are converted automatically. Your e–mail address will not show up on any public page.