Hi
Pls help
I have used a simple 2 text boxes and a button
in button click event
i have used:
string conn = "Data Source=SACHIN;Initial Catalog=sample;Integrated Security=SSPI;User ID=";
//string conn = " Data Source=myServerAddress;Initial Catalog=sample;Integrated Security=SSPI;User ID=;Password=";
SqlConnection sqlcon = new SqlConnection(conn);
sqlcon.Open();
SqlCommand comm = new SqlCommand("Insert into table1 (User_Name,User_Password) values (@TextBox1.Text,@TextBox2.Text)", sqlcon);
comm.Parameters.AddWithValue("TextBox1", TextBox2.Text.ToString());
//comm .Parameters.AddWithValue(
comm.Parameters.AddWithValue("TexBox2", int.Parse (TextBox2.Text.ToString()));
comm.ExecuteNonQuery();
DB used: SQL SERVER 2005
I get the following error!!
pls help asap
advanced thaks