473,407 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Why am I getting the error in Access 2010 "Current Recordset does not support updatin

I am using Access 2010 and I am getting this error:

"Current Recordset does not support updating. There may be a limitation of the provider, or of the selected locktype."

Expand|Select|Wrap|Line Numbers
  1. Dim SQLstr as String
  2. Dim R as ADODB.Recordset
  3. Set R = New ADODB.Recordset
  4.  
  5. SQLstr = "SELECT * FROM TABLE1;"
  6. R.OPEN SQLstr, CurrentProject.Connection, _
  7. adOpenDynamic, adLockReadOnly
  8.  
  9. R.AddNew 'error here
I have tried many combinations of locktypes and tried to look at similar questions asked, but I have no idea why this error is happening. Thanks in advance for any input!
Jun 14 '14 #1

✓ answered by jimatqsi

firebird,
Welcome to Bytes.com. Weekends arent't the busiest time here, but there's usually at least one guy on deck. I guess that's me, today, even though I don't use ADO much.

If you read you own code you'll see the answer is obvious. You're opening the table in Read Only mode - read only means not in write mode.

Take a look at this: http://www.w3schools.com/ado/prop_rs_locktype.asp

Note the LockTypeEnum enumerator spells out the different values for that parameter. You probably want adLockOptimistic.

Jim

2 1186
jimatqsi
1,271 Expert 1GB
firebird,
Welcome to Bytes.com. Weekends arent't the busiest time here, but there's usually at least one guy on deck. I guess that's me, today, even though I don't use ADO much.

If you read you own code you'll see the answer is obvious. You're opening the table in Read Only mode - read only means not in write mode.

Take a look at this: http://www.w3schools.com/ado/prop_rs_locktype.asp

Note the LockTypeEnum enumerator spells out the different values for that parameter. You probably want adLockOptimistic.

Jim
Jun 14 '14 #2
Ha! Whoops. I thought I'd copied over directly from another module that worked so I was falsely confident that wasn't the problem.

Of course I see it now and it works. Thanks for answering my question, I'm really new to this VBA stuff.
Jun 14 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: barret bonden | last post by:
(closest newsgroup I could find) Error Type: ADODB.Recordset (0x800A0CB3) Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype....
5
by: Hexman | last post by:
I've come up with an error which the solution eludes me. I get the error: >An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in HRTest.exe > >Additional...
9
by: Johnfli | last post by:
ADODB.Recordset error '800a0cb3' Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype. I am moving my webserver from NT4 using SQL...
3
by: aleseus | last post by:
New to the forum, so thanks for having me. I'm submitting a form, and attempting to save it to a local copy of an ACCESS 2007 database. When I am submitting the form, I get the following error: ...
0
by: Andolino | last post by:
In Access 2010 I get a Write Conflict error - "This record has been changed by another user..." In Access 2007 this Code is working - why? Private Sub Form_BeforeUpdate(Cancel As Integer) Dim...
3
by: john latona | last post by:
hi! i realize that access 2010 does not have the username and password function built into it, so i am trying to build it into my db. i have a "login form" with text fields titled username and...
4
beacon
by: beacon | last post by:
Hi everybody, My title may not exactly describe my issue, so please forgive my lack of creativity today. I've got a database that was created in Access 2003 that I've opened in Access 2010. I...
11
by: Redbeard | last post by:
I have just upgraded to Access 2010 (64 bit) from Access 2007. There were a few minor issues in the database which I have resolved but this one piece of code just won’t work. I do not write VBA but...
2
by: Redbeard | last post by:
I need to save my Access 2010 database in 2003 format so that someone can use it that is only running 2003. My database was built using Access 1997 and has been upgraded over the years to 2003, 2007...
0
by: ianadd | last post by:
I have an Access application which works fine in earlier versions of MS ACCESS on earlier platforms. I am now trying to get it to work in Access 2010 on Windows 7. In earlier versions I simply had...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.