I have an ASP.NET application which is suppose to connect to an application and add some data. But it wont let me.. it keeps spitting out log in failed errors at me.
What is my Connection String suppose to be like? I pretty much have no idea wut im doing.
here is a small piece of code.
SqlConnection conn = new SqlConnection(SqlDataSource1.ConnectionString);
string cmdInsert = "INSERT INTO table1";
SqlCommand cmd = new SqlCommand(cmdInsert, conn);
cmd.Parameters.AddWithValue("@Name", TextBox1.Text);
cmd.Parameters.AddWithValue("@Number", TextBox2.Text);
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
Thanks.

New Topic/Question
Reply




MultiQuote




|