I'm getting the error above when I try to insert a row into an Access table using VisualStudio/VisualBasic. I've made the Insert statement as simple as I could to eliminate the possibility of a data error. The Sub to open the connection is wrapped in a try/catch so I know it's working ok. The only thing that worries me is that the Archives table has an autonum primary key (ArchID). I read somewhere that I don't need to worry about that in my Insert statement but maybe that's not correct. I'm new to VB so please keep any help simple. THanks.
Here is the code for the Insert sub:
Try
Dim myInsertCommand As New OleDbCommand
Dim strDummy As String = "Ross"
ArchiveOpenConnection()
myInsertCommand.Connection = myConn
myInsertCommand.CommandText = "INSERT INTO Archives (
ArchUser
) VALUES (
strDummy
);"
myInsertCommand.ExecuteNonQuery()
myConn.Close()
MessageBox.Show("IT WORKED!")
Catch ex As Exception
MessageBox.Show("DIDNT WORK")
End Try