Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem updating records using ADO on an Access database
Message
De
01/04/1998 14:22:02
Roger Miller
Benny Hinn Ministries
Orlando, Floride, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
Problem updating records using ADO on an Access database
Divers
Thread ID:
00088755
Message ID:
00088755
Vues:
54
I am receiving an error 3251 "This operation is not supported by this provider" when I am simply trying to move data from a textbox control to a recordset field for updating. I am new to ADO and don't understand where I am going wrong. The following is the code that I am using

Private Sub Form_Load()
Set cntPORequest = New ADODB.Connection
Set rstGroups = New ADODB.Recordset
cntPORequest.Mode = adModeReadWrite
cntPORequest.Provider = "MSDASQL"
cntPORequest.ConnectionString = "PORequest"
cntPORequest.CursorLocation = adUseClient
cntPORequest.Open
rstGroups.ActiveConnection = cntPORequest
rstGroups.CursorType = adOpenKeyset
rstGroups.LockType = adLockOptimistic
rstGroups.Source = "tblGroup"
rstGroups.Open
End Sub

I use the following two lines of code to find a specific record for editing.

strCmd = "Select * From tblGroup Where tblGroup.GroupName = '" & bGroups.Text & "'"
Set rstGroups = cntPORequest.Execute(strCmd)


<<< The error occurs on anyone of these lines when moving the changes>>>

Private Sub MoveDataToRecord()
rstGroups!GroupLeader = tbGroupLeader
rstGroups!GroupName = tbGroupName
rstGroups!Login = tbLogin
rstGroups!Password = tbPassword
End Sub

Can anyone please help?
Répondre
Fil
Voir

Click here to load this message in the networking platform