我的vb 2010代码使用访问数据库时遇到此错误 我无法识别错误,请帮忙 程序代码如下所示
Private Sub updateloan()
Dim cmd As New OleDb.OleDbCommand
If Not conn.State = ConnectionState.Open Then
conn.Open()
End If
cmd.Connection = conn
cmd.CommandText = "UPDATE tblLoanSetup " & _
"SET Loan_no=" & Me.lblloanno.Text &
",ID='" & Me.txtidnumber.Text & "'" & _
",first_name='" & Me.TextFname.Text & "'" & _
",last_name='" & Me.TextLname.Text & "'" & _
",a_date='" & Me.TextDateofLoan.Text & "'" & _
",loan_type= '" & TextLoanType.Text & "'" & _
",loan_amount='" & Me.lblloanrem.Text & "'" & _
",payable_in_months= '" & lblinstbal.Text & "'" & _
",instalments='" & Me.lblpriminst.Text & "'" & _
",interest= '" & TextInterestMonth.Text & "'" & _
",processing_fee='" & Me.lblprocessfee.Text & "'" & _
",available_amount= '" & Me.TextLoanRelease.Text & "'" & _
",available_amount= '" & Me.lblprincln.Text & "'" & _
"WHERE tblLoanSetup.ID =" & Me.txtidnumber.Text & ""
cmd.ExecuteNonQuery()
MessageBox.Show("Successfully Updated")
' Me.btnClear.PerformClick()
conn.Close()
End Sub