S
SheryMich
Hi -
I am having a bit of a problem with the insert into a database. When I go
to insert a record into an un-keyed, single table Access database, I get the
aforementioned ''Operation Must Use an Updateable Query' error.
Points:
- The database is in my local temp directory, not inetpub
- The directory has read/write permissions
- The database has read/write permissions
- I created another version of the dbase and tried to reference it with the
same result
- I can access the dbase and sucessfully select rows from the database to
populate a datagrid
Other points:
- Database sucessfully opens and closes
- IIS was installed after the VB.net code. I re-ran gacutil to re-register
dlls
Code Snippet:
Dim mSQL As String = "INSERT INTO Messages(LastName, FirstName,
EmailAddress, MessageDate, Message) VALUES ('Smith','John',
'(e-mail address removed)','10/26/2003','stuffs')"
Dim objCmd As New OleDbCommand(mSQL, cn)
Try
objCmd.ExecuteNonQuery()
Catch ex As Exception
Label.Text = ex.Message
End Try
I am not sure at this point whether this is a VB or ADO issue. Any thoughts
or suggestions would be greatly appreciated.
- Sheryl
I am having a bit of a problem with the insert into a database. When I go
to insert a record into an un-keyed, single table Access database, I get the
aforementioned ''Operation Must Use an Updateable Query' error.
Points:
- The database is in my local temp directory, not inetpub
- The directory has read/write permissions
- The database has read/write permissions
- I created another version of the dbase and tried to reference it with the
same result
- I can access the dbase and sucessfully select rows from the database to
populate a datagrid
Other points:
- Database sucessfully opens and closes
- IIS was installed after the VB.net code. I re-ran gacutil to re-register
dlls
Code Snippet:
Dim mSQL As String = "INSERT INTO Messages(LastName, FirstName,
EmailAddress, MessageDate, Message) VALUES ('Smith','John',
'(e-mail address removed)','10/26/2003','stuffs')"
Dim objCmd As New OleDbCommand(mSQL, cn)
Try
objCmd.ExecuteNonQuery()
Catch ex As Exception
Label.Text = ex.Message
End Try
I am not sure at this point whether this is a VB or ADO issue. Any thoughts
or suggestions would be greatly appreciated.
- Sheryl