-3
我得到错误..错误:Incorrect syntax near 's'
附近有语法错误 'S'
代码:
con = new SqlConnection("Data Source=DELL-PC;Initial Catalog=sashi;Integrated Security=True");
con.Open();
SqlCommand sc = new SqlCommand("INSERT INTO Login VALUES('" + textBoxUID.Text + "','" + textBoxPWD.Text + "','" + comboBoxQUN.Text + "','" + textBoxANS.Text + "') ", con);
sc.ExecuteNonQuery();
MessageBox.Show("Record has been inserted");
con.Close();
我忘了什么或者是错误?
yes ..只有4列 – 2014-10-29 07:36:20
现在出现错误ExecuteNonQuery:连接属性尚未初始化。 – 2014-10-29 07:39:59
现在该做什么? – 2014-10-29 07:40:16