com = new SqlCommand(); con = new SqlConnection(stcon);//problem here com.Connection = con; com.CommandText = "insert into client(name)values(@a)"; com.Parameters.AddWithValue("@",name); try { con.Open(); int i = com.ExecuteNonQuery(); if (i>0) con.Close(); } catch(Exception ex) { throw ex; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)