General information
Category:
Database DAO/RDO/ODBC/ADO
Title:
Recordset is readonly
I am having a problem with rdo. I am getting an error that my reesultset is readonly. I have enclosed my code below. I feel like I am doing it right. My DBA said that it is not on his side, Thats what they all say.
Connect Code...
' Allocate an ODBC environment handle
Set mrdoEnv = rdoEnvironments(0)
Set mrdoConn = mrdoEnv.OpenConnection("GITSDEV", rdDriverNoPrompt, False, "ODBC;UID=;PWD=")
'Select Statement to populate form, this may have to be modified for speed.
sSQL = _
"SELECT member.* " _
& "FROM member " _
& "ORDER BY member.lastname ASC;"
Set mrdoRS = mrdoConn.OpenResultset(sSQL, rdOpenKeyset, rdConcurRowver)
mrdoRS.MoveFirst
SetRecNum
DataLoad
Edit Code...
mrdoRS.Edit
mrdoRS("Address1") = txtAddress1.Text
mrdoRS("Address2") = txtAdd2.Text
mrdoRS("SSN") = txtSSN.Text
mrdoRS("Lastname") = txtLastname.Text
mrdoRS("Firstname") = txtFirstname.Text
mrdoRS("Middlename") = txtMiddle.Text
mrdoRS("Salutation") = txtSalutation.Text
mrdoRS("Suffix") = txtSuffix.Text
mrdoRS("BirthDate") = txtBirthdate.Text
mrdoRS("Gender") = txtGender.Text
mrdoRS("City") = txtCity.Text
mrdoRS("State") = txtState.Text
mrdoRS("Zip") = txtZip.Text
mrdoRS("County") = txtCounty.Text
mrdoRS("homephone") = mskHomephone.Text
mrdoRS("workphone") = mskWorkPhone.Text
mrdoRS("workexten") = txtWorkExten.Text
mrdoRS.Update
'Error Trapping
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