为什么运行Vb.net时老提示update语法错误
PrivateSubButton1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesBu...
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim connstr, updatecmd As String connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\My Documents\Visual Studio 2005\db1.mdb" updatecmd = "update login set sname='" & TextBox2.Text & "',spassword='" & TextBox3.Text & "',telephone='" & TextBox4.Text & "',add='" & TextBox5.Text & "' where sno='" & TextBox1.Text & "'" Dim conn As OleDbConnection, cmd As OleDbCommand conn = New OleDbConnection(connstr) conn.Open() cmd = New OleDb.OleDbCommand(updatecmd, conn) cmd.ExecuteNonQuery() conn.Close() Me.LoginTableAdapter.Fill(Me.Db1DataSet1.login)
展开
若以下回答无法解决问题,邀请你更新回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询