not sure from when, I started get error: Exception Details: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0. I am using Microsoft .NET Framework Version:2.0.40607.42; ASP.NET Version:2.0.40607.42
and sql 2005 beta, the connectionstring in web.config like this: It happens on string connString = ConfigurationSettings.ConnectionStrings["dbbase"].ToString(); SqlConnection conn = new SqlConnection(connString); -- this line It seems a few people had this
problem, but I could not find an answer. On microsoft site, there is a fix for asp.net 1.1 and it says this happens when there is ' or " in connection string, but both not in my case. please help/ Thanks!
Anyone find a solution to this?? I have the same problem. I'm fairly sure my connection string in my config file is correct so it has to be a coding error.
Anyone find a solution to this?? I have the same problem. I'm fairly sure my connection string in my config file is correct so it has to be a coding error.
wyx2000
Contributor
3388 Points
873 Posts
Solution for "Format of the initialization string does not conform to specification starting at i...
Dec 16, 2004 05:28 AM|LINK
mrshanes
Member
70 Points
14 Posts
Re: Solution for "Format of the initialization string does not conform to specification starting ...
May 28, 2005 03:03 AM|LINK
belgiumbabe0...
Member
8 Points
5 Posts
Re: Solution for "Format of the initialization string does not conform to specification starting ...
Jul 23, 2007 08:24 AM|LINK
Anyone find a solution to this?? I have the same problem. I'm fairly sure my connection string in my config file is correct so it has to be a coding error.
protected void Button1_Click(object sender, EventArgs e){
string sql = DropDownList1.SelectedValue;if (!String.IsNullOrEmpty(sql)){
String EC = "EsteeConnection";
using (SqlConnection Connection = new SqlConnection(EC)){
using (SqlCommand Command = new SqlCommand(sql, Connection)){
Connection.Open();
SqlDataReader reader = Command.ExecuteReader(CommandBehavior.CloseConnection);GridView1.DataSource = reader;
GridView1.DataBind();
}
}
}
}
Anyone see a mistake in this??
belgiumbabe0...
Member
8 Points
5 Posts
Re: Solution for "Format of the initialization string does not conform to specification starting ...
Jul 23, 2007 08:27 AM|LINK
Anyone find a solution to this?? I have the same problem. I'm fairly sure my connection string in my config file is correct so it has to be a coding error.
protected void Button1_Click(object sender, EventArgs e){
string sql = DropDownList1.SelectedValue;if (!String.IsNullOrEmpty(sql)){
String EC = "EsteeConnection";
using (SqlConnection Connection = new SqlConnection(EC)){
using (SqlCommand Command = new SqlCommand(sql, Connection)){
Connection.Open();
SqlDataReader reader = Command.ExecuteReader(CommandBehavior.CloseConnection);GridView1.DataSource = reader;
GridView1.DataBind();
}
}
}
}
Anyone see a mistake in this??
belgiumbabe0...
Member
8 Points
5 Posts
Re: Solution for "Format of the initialization string does not conform to specification starting ...
Jul 23, 2007 08:45 AM|LINK
http://www.velocityreviews.com/forums/t87146-simple-dbproblem.html
i found the solution to my problem here ... the new connection string had to be called diffeerently.
Hope this helps other people.
belgiumbabe0...
Member
8 Points
5 Posts
Re: Solution for "Format of the initialization string does not conform to specification starting ...
Jul 23, 2007 09:26 AM|LINK
Actually never mind that doesn't seem to be working the way i want .. anybody got any ideas??
MadhavRao
Member
386 Points
73 Posts
Re: Solution for "Format of the initialization string does not conform to specification starting ...
Nov 04, 2009 03:54 AM|LINK
I would suggest you re-check your connection string. Refer http://www.connectionstrings.com/