Jon Gallant

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

1 min read

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:

public static string ConnectionString = string.Format(ConfigurationManager.ConnectionStrings[“Videos”].ConnectionString, HttpContext.Current.Server.MapPath(”~/”));

Share:
Share on X