Trying to update a database through a system DSN using:
Dim wrkspace As Workspace
Dim dbsSnap As Connection
Dim rstTemp As Recordset
Set wrkspace = CreateWorkspace("ODBCWorkspace", "admin", "",
dbUseODBC)
Set dbsSnap = wrkspace.OpenConnection("snapDB", _
dbDriverCompleteRequired, False, _
"ODBC;DATABASE=snapDB;UID=;PWD=;DSN=snapSystem")
Set rstTemp = dbsSnap.OpenRecordset("info", dbOpenDynamic,
dbExecDirect)
rstTemp.MoveLast
MsgBox (rstTemp.RecordCount)
rstTemp.MoveFirst
MsgBox (rstTemp.Updatable) 'gives false, want true
rstTemp.Edit 'error on this line (database is read-only)
rstTemp!output1 = "myOutput"
rstTemp.Update
rstTemp.Bookmark = rstTemp.LastModified
dbsSnap.Close
wrkspace.Close
End Sub
The database was set up to be not read-only. I can't seem to figure
out why I can only read the data. In the docs it said something about
indexing your table, I indexed it with an autonumber in access but
that made no difference. I'm thinking that maybe I have to index it
in VB somehow?
Please let me know if you have any knowledge on this, I'm sure it's
some small thing somewhere.
Dan.