Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't update recordset in ADO. 1

Status
Not open for further replies.

CptCrusty1

Programmer
Feb 17, 2005
216
US
I have a one record table that has a field I need to update with the contents of a variable. In DAO I would used EDIT, modify the field(s), use Update, save, etc. I can't make it work in ADO... Here's my code...

Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset

Set cnn = CurrentProject.Connection
Set rst = cnn.Execute("tbl_exports")


rst!Location = strUNC_Conv
rst.Update
rst.Save

My error message is #3251 - Current recordset does not support updating, this may be a limitation of the provider, or a selected Locktype. I looked at .locktype but didn't see any way to change it. Any ideas?

RK

I live to work and I work to live.
 
Perhaps something like this ?
rst.Open "tbl_exports", cnn, adOpenKeyset, adLockOptimistic, adCmdTable

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV, you're always there.. you must have your PC plugged into your brain... Yes, I used that... now I just gotta figure out where my missing ( is..... FUN FUN FUN!!!

Thanks!

I live to work and I work to live.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top