|
-
Apr 12th, 2010, 12:41 PM
#1
Thread Starter
Addicted Member
Update record error 3251 Microsoft.ACE.OLEDB.12.0
Hello,
I searched for the solution, but I couldn't find a clear answer.
I am trying to update a record using Microsoft.ACE.OLEDB.12.0 with a MSAccess 2007 DB. I am getting a '3251' error "Current Recordset does not support updating. This may be a limitaion of the provider, or the selected locktype."
I have researched the locktype enum and the provider information. I am new to using Access 2007 for the DB. Previously I used Access 2000.
Here is the code in question:
Code:
Set cn = New ADODB.Connection
cn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=" & App.Path & "\BeengData.accdb"
cn.Open
rs.Open strSQL, cn, adOpenStatic, adLockOptimistic
rs.AddNew
rs.Fields("ScheduleName").Value = txtScheduleName.Text
rs.Update
Last edited by Beengie; Apr 13th, 2010 at 03:00 PM.
BeengieHappy.Vaue = (SharksScore > OpponentsScore)
Go Sharks!
-
Apr 12th, 2010, 02:25 PM
#2
Re: Update record error 3251 Microsoft.ACE.OLEDB.12.0
Thread moved to 'Database Development' forum (the 'VB6' forum is only meant for questions which don't fit in more specific forums)
There are basically 3 things that matter, the lock type and the cursor type (both explained in the FAQ article What do the parameters of the recordset.Open method mean?), and the file/folder permissions (as explained in the "Access" section of the FAQs).
As your file location includes App.Path, I seriously doubt that the permissions are right... and you really shouldn't be storing data files there anyway, see the article Where should I store the files that my program uses/creates? from our Classic VB FAQs (in the FAQ forum)
-
Apr 12th, 2010, 03:23 PM
#3
Thread Starter
Addicted Member
Re: Update record error 3251 Microsoft.ACE.OLEDB.12.0
There are basically 3 things that matter, the lock type and the cursor type (both explained in the FAQ article What do the parameters of the recordset.Open method mean?), and the file/folder permissions (as explained in the "Access" section of the FAQs).
Thanks for that link.
However...
How does that fall under database development? I am not developing the database...
If I asked a question about VBA code then it should go to database development...
The code in question was VB6.
Guess that is why I can't find answers when I search...
There seems to be less and less answers in the VB6 forum, but more answers in FAQ and database development...
I usually only search in VB6 so I can filter out all the other crap, now you guys are "moderating" issues right out of the category...
Needless to say I'm a bit frustrated that I cannot get information on this site easy any more (used to be easy to get answers)...
In fact I have gone to other code sites for answers and seen some of the moderators from here arguing instead of providing answers....
SAD
BeengieHappy.Vaue = (SharksScore > OpponentsScore)
Go Sharks!
-
Apr 12th, 2010, 04:35 PM
#4
Re: Update record error 3251 Microsoft.ACE.OLEDB.12.0
 Originally Posted by Beengie
How does that fall under database development? I am not developing the database...
As shown in the forum descriptions, this forum is for anything to do with a database - whether that is designing tables etc, or interacting with a database from a program.
If I asked a question about VBA code then it should go to database development...
No it shouldn't, in most cases anyway.
VBA questions (even for Access) generally belong in the Office Development forum. The exceptions (which arguably fit in either) are when people are writing VBA code to interact with a database.
Guess that is why I can't find answers when I search...
Agreed.
There seems to be less and less answers in the VB6 forum, but more answers in FAQ and database development...
Those are the places you should be looking - especially the FAQs, as they are a fairly short and simple list of bullet points (with shortcuts to each section, so you can quickly drill-down to the part that is likely to answer your question).
Clearly the FAQs don't always contain the answers, but if they do then they are generally better than a reply to a thread - because those of us who write FAQ articles typically spend about 50 times as long writing them (including checking documentation, testing code, searching previous threads for alternate solutions/caveats, etc).
now you guys are "moderating" issues right out of the category...
That has been happening here since before I joined - and it certainly isn't unique to this site.
Needless to say I'm a bit frustrated that I cannot get information on this site easy any more (used to be easy to get answers)...
You still can, but it helps to look/post in the right places.
I suspect the information I gave you above will be everything you need, but of course you may have further questions on it.
In fact I have <snip> seen some of the moderators from here arguing instead of providing answers....
We definitely prefer not to do that, we would much rather be answering questions instead... but there are times when people decide to argue with us, and unfortunately the role of a moderator is basically a rule enforcer and peace keeper.
-
Apr 12th, 2010, 07:37 PM
#5
Thread Starter
Addicted Member
Re: Update record error 3251 Microsoft.ACE.OLEDB.12.0
this is a great example, thanks for making my point about some moderators...
Last edited by Beengie; Apr 12th, 2010 at 07:40 PM.
Reason: added the word "some"
BeengieHappy.Vaue = (SharksScore > OpponentsScore)
Go Sharks!
-
Apr 12th, 2010, 09:42 PM
#6
Re: Update record error 3251 Microsoft.ACE.OLEDB.12.0
-
Apr 13th, 2010, 07:36 AM
#7
Re: Update record error 3251 Microsoft.ACE.OLEDB.12.0
-
Apr 13th, 2010, 03:00 PM
#8
Thread Starter
Addicted Member
Re: Update record error 3251 Microsoft.ACE.OLEDB.12.0
It would have been better if you had worked it out yourself
nice... that's why I only have 236 posts since Nov 03.
your 28,365 posts Jul 02 are probably mostly this kind of arguing due to you being the biggest know it all of this subject...
take it easy on the people asking questions geek man. not everyone is the mvp
BeengieHappy.Vaue = (SharksScore > OpponentsScore)
Go Sharks!
-
Apr 13th, 2010, 05:15 PM
#9
Re: Update record error 3251 Microsoft.ACE.OLEDB.12.0
As I said in the second half of the sentence you quoted, your mistake was understandable - and I would far rather you hadn't decided to turn it into an argument, but that was entirely your choice.
I'm hoping that the fact you have not posted anything about the issue since the initial post means you have solved it... if not then feel free to ask questions, as that is what I come here for (and what the vast majority of my posts are about).
Tags for this Thread
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
|