您认为导致错误的原因是什么? 它在我在MS Access数据库中添加新字段之前有效,是错误的原因
Dim conn As New
OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=C:\Users\JA\Documents\Sample_LogIn.accdb")
Dim insert As String = "Insert into Students values
('" & textID.Text & "', " &
"'" & textFirstName.Text & "', " &
"'" & textLastName.Text & "', " &
"'" & textPassword.Text & "')"
Dim cmd As New OleDbCommand(insert, conn)
conn.Open()
cmd.ExecuteNonQuery()
MsgBox("Successfully created new account.")
Me.Close()
Catch ex As Exception
MsgBox("Error encountered while creating new account." & vbCrLf &
"Ërror: " & ex.Message)