ACCESS转成SQL后相关sql语句的修改
连接ACCESS数据库时候,sql语句是如下:
sql = "update student set updatetime=#" & Format(Now, "yyyy-MM-dd HH:mm:ss") & "# where card_id='" & card_id.Text & "'"
请问,数据库转成SQL之后,这条语句应该怎样改?? sql access
[解决办法]
sql = "update student set updatetime=getdate() where card_id='" +card_id.Text + "'"
[解决办法]
string sqlstr =string.Format("update student set updatetime = getdate() where card_id={0}",card_id.Text);