|
-
Sep 21st, 2000, 12:40 PM
#1
Thread Starter
New Member
When trying to run the following code I get a 3251 runtime error. It says "...not supported by the provider...". I am using ADO (ActiveX Libarary 2.1).
----------------------------------------
With rsName
.addnew
.rsName.Fields("fldFirstName").Value = txtFName
.update
End With
-----------------------------------------
the code will not go past the Addnew command. I am new to ADO, so any help would be really appreciated. Thanks
-
Sep 21st, 2000, 01:04 PM
#2
Addicted Member
Try This
With rsName
.addnew
.Fields("fldFirstName").Value = txtFName
.update
End With
also if this doesn't work you might want to try to upgrade to ADO version 2.5 available from Microsoft (look for MDAC_TYP.EXE version 2.5)
If you have more problems let me know.
-
Sep 21st, 2000, 03:20 PM
#3
Thread Starter
New Member
I tried downloading the update...but still no luck. I had my code the way you had showed it, I had made a typo when I posted it on here.
Any idea's?
Here is the code again (should be correct this time)
----------------------------------------------------
Set rsMiscWork = New Recordset
rsMiscWork.Open "tblMiscWork", dbRadio
With rsMiscWork
.AddNew
.Fields("fldDate").Value = txtDate.Text
.Fields("fldSite").Value = cmbSite.Text
.Fields("fldWork").Value = txtWork.Text
.Update
.Requery
End With
------------------------------------------------------
Also the error reads "Object or provider is not capable
of performing requested operation"
-
Sep 21st, 2000, 05:08 PM
#4
Hyperactive Member
check the lock type
I sometimes both of those errors if I forget to specify the
lock type. Try setting the lock type to Optimistic Locking
and see if that helps.
it would look like
Code:
Set rsMiscWork = New Recordset
rsMiscWork.Open "tblMiscWork", dbRadio, adOpenKeyset, adLockOptimistic
-
Sep 21st, 2000, 09:16 PM
#5
Lively Member
More information.
When you use .open property without specifying any cursor and lock types, the default will be adOpenForwardOnly and adLockReadOnly, repectively. Therefore, if you want to update, you have to specify one of these arguments.
Cursor Type: adOpenKeyset, adOpenDynamic, and adOpenStatic
Lock Type: adLockPessimistic, adLockOptimistic, and adLockBatchOptimistic
-
Sep 22nd, 2000, 11:11 PM
#6
Thread Starter
New Member
GOT IT!
I set the record locking to optimistic and it started working.
Thanks alot for all the help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|