Dim sname As String = "'" & txtname.Text & " '"
Dim skemu As String = "'" & txtkemu.Text & " '"
Dim sjf As String = "'" & txtjf.Text & " '"
Dim stel As String = "'" & txttel.Text & " '"
Dim sschool As String = "'" & txtschool.Text & " '"
Dim syp As String = "'" & txtyp.Text & " '"
Dim sdemo As String = "'" & txtdemo.Text & " '"
Dim currentid As String = txtid.Text
'MessageBox.Show(currentid)
'定义更新SQL语句
Dim updatestr As String = "update detail set"
updatestr = updatestr & " name=" & sname
updatestr = updatestr & ", kumu=" & skemu
updatestr = updatestr & ", jf=" & sjf
updatestr = updatestr & ", yp=" & syp
updatestr = updatestr & ", tel=" & stel
updatestr = updatestr & ", school=" & sschool
updatestr = updatestr & ", demo=" & sdemo
updatestr = updatestr & " where id=" & currentid
MessageBox.Show(updatestr)
'打开连接并执行更新操作
OleDbConnection1.Open()
OleDbDataAdapter1.UpdateCommand.CommandText = updatestr
OleDbDataAdapter1.UpdateCommand.ExecuteNonQuery()
'重新填充数据集并关闭连接
DataSet11.Clear()
OleDbDataAdapter1.Fill(DataSet11)
OleDbConnection1.Close()
Else
'否则重新填充数据集
DataSet11.Clear()
OleDbDataAdapter1.Fill(DataSet11)
End If
连接的是ACCESS的语句
提示UPDATE 语句错误
请教.................. 急 !!!!!!!!! 在线等 谢谢了