晕了,关于更新数据的问题!很简单的。
tflb 2005-07-10 04:22:09 请问我下面哪有问题呀!为什么不能更新数据呢!
SqlConnection conn;
String str;
SqlCommand cmdUpdate;
conn= new SqlConnection(connstr);
str="update kq_code set NewCardID=319 where employeeID=319";
cmdUpdate=new SqlCommand(str,conn);
conn.Open();
cmdUpdate.ExecuteNonQuery();
conn.Close();
//connstr连接串,没问题
//update kq_code set NewCardID=319 where employeeID=319在sql server中直接用就好用。
请指点一下,谢谢了。