Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reslutset is readonly Opps wrong code
Message
From
12/05/1998 07:45:50
 
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
Reslutset is readonly Opps wrong code
Miscellaneous
Thread ID:
00098698
Message ID:
00098698
Views:
94
This is the correct code...

Set mrdoEnv = rdoEnvironments(0)
Set mrdoConn = mrdoEnv.OpenConnection("GITSDEV", rdDriverNoPrompt, False, "ODBC;UID=sa;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

End Sub

This is the edit procedure...

Private Sub DataSave()
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

End Sub
Reply
Map
View

Click here to load this message in the networking platform