Extreme -2147467259 Annoyance!

Dugantrain

I Love Pants
Local time
Yesterday, 20:49
Joined
Mar 28, 2002
Messages
221
Anytime I use ADO functions, whenever I'm developing forms that call these functions, I constantly get the -2147467259 error message: "Database has been placed in a state by user Admin..." when switching back and forth between Design and Run Views. In order to avoid the error, I have to save my work, close the form completely, and then open it back up. This is a huge annoyance, almost enough to make me not want to use ADO and just develop using queries. I've searched the Forums for a solution, but the posted hyperlinks to the MS Knowledge Base concerning this error seem to be broken. So is there a way to avoid this error and develop hassle free?
*edit* For what it's worth, when I get this error, the function is always breaking on
Code:
My_Connection.Open
 
Last edited:
Hi, after a long while, I happened to stumble across the answer to this problem while I was at a book store:
Code:
If CBool(My_Connection.State and AdStateOpen) Then
     My_Connection.Close
End If
 
Annoyance

If I understand how Access works, you don't need to create a connection when you are programming in VBA because you are already connected to the database through VBA. If you needed to connect to another database then ADO works fine, however DAO would also work in your situation (again without the connection oject --- use set objDBS = DBCurrent as connection source)
 
Well, ADO isn't absolutely necessary, but I have found it to be a quick and handy tool for several things like counting records in a table, deleting records, etc.
 

Users who are viewing this thread

Back
Top Bottom