Error '3251': Current Recordset does not support updating (1 Viewer)

jaffar2000

Registered User.
Local time
Today, 10:34
Joined
Apr 15, 2012
Messages
28
Hi,
My code is working just fine on my computer and I can update the access from my excel.
When trying to do the same from one of my user's computer, I get this error message:
"Run-time error '3251': Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype."

Here is the relevant part of the code:
**********************************************
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset

Set cn = New ADODB.Connection

cn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\IP\referantim\System Change Requests\Requests_Management_File.accdb;Persist Security Info=False;"

cn.Open
Set rs = New ADODB.Recordset

rs.Open "Requests", cn, adOpenKeyset, adLockOptimistic, adCmdTable

With rs
.AddNew
.Fields("request_date") = Sheets("form").Range("H4")
.Fields("requested_by") = Sheets("form").Range("B4")
.Fields("department") = Sheets("form").Range("B8")

.Update
End With

rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
******************************************

We both use access2007 and excel 2010
I use excel 2010 and my user excel 2007.
I have win7 and my user winXP

Any ideas?
 

sparks80

Physicist
Local time
Today, 18:34
Joined
Mar 31, 2012
Messages
223
Hi,

What version of the ADO library are you using. Is this the same on both computers?
 

jaffar2000

Registered User.
Local time
Today, 10:34
Joined
Apr 15, 2012
Messages
28
I think I found the problem.
We had different permissions to the folder the access file is stored in.
 

sparks80

Physicist
Local time
Today, 18:34
Joined
Mar 31, 2012
Messages
223
That would make sense. Glad you resolved the problem :)
 

Users who are viewing this thread

Top Bottom