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!
Any luck with this? I've got the same problem.
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??
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??
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.
Actually never mind that doesn't seem to be working the way i want .. anybody got any ideas??
you have to set up the SQL connection settings for this drag and drop SQL data source and set it up as per your knowledge.
hope that will resolve the error.
沒有留言:
張貼留言