General information
Category:
Database DAO/RDO/ODBC/ADO
Title:
Resultset is readonly
I am createing a resultset using rdo. When I go to edit and update that resultset I get an error stating that the resultset is read only.
Listed below is a sample of what I am doing. Please Help!!!
'Allocate an ODBC environment handle
Set mrdoEnv = rdoEnvironments(0)
Set mrdoConn = mrdoEnv.OpenConnection("Books Available", _
rdDriverNoPrompt, False, "ODBC;UID=jkennedy;PWD=reach4")
sSQL = _
"SELECT titles.*, publishers.* " _
& "FROM titles, publishers " _
& "WHERE publishers.pub_id = titles.pub_id " _
& "ORDER BY titles.title ASC;"
Set mrdoRS = mrdoConn.OpenResultset(sSQL, _
rdOpenKeyset, rdConcurRowVer, 0)
This is the edit procedure:
mrdoRS.Edit
mrdoRS("Advance") = txtAdvance.Text
mrdoRS("Notes") = txtNotes.Text
mrdoRS("Price") = txtPrice.Text
'mrdoRS("Pub_Name") = txtPublisher.Text
mrdoRS("title") = txtTitle.Text
mrdoRS.Update
On Error GoTo DataSaveError
mrdoRS.Update
mDirty = False
Exit Sub
DataSaveError:
frmRDOErrors.ErrorColl = rdoErrors
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only