Solved

MSAccess dll missing

Posted on 2010-08-24
13
402 Views
Last Modified: 2012-06-27
This code was working fine on the cusomter's machine up to a week ago.  It is still working on mine and I can't figure out what is wrong....

Code:

    Set OBJLocaldbConnection = CurrentProject.Connection
    ObjLocaldbCommand.ActiveConnection = OBJLocaldbConnection
    OBJLocaldbConnection.CommandTimeout = 0


It is obvious something got clobbered on their machine, but I am clueless how to fix.

Any suggestion would be very helpful!  thank you.
0
Comment
Question by:CaroleTSullivan
  • 7
  • 6
13 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33513732
Make sure the Microsoft ADO library is loaded in the VBA references

Open the VBA Editor and click:
Tools-->References

;-)

JeffCoachman
0
 

Author Comment

by:CaroleTSullivan
ID: 33515965
it is.  That is the wierd thing.  
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33516990
What happens if you comment out the Timeout line?

What happens if you change it to 30,000 (30 seconds, the default)?

See here for some notes regarding a bug with this:
http://support.microsoft.com/kb/175264

JeffCoachman

0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33516997
...Also, can you try this with DAO and see if that will work...?

(Obviously you must Load the MS DAO library, in the VBE)
0
 

Author Comment

by:CaroleTSullivan
ID: 33518055
regarding using DAO .... is the code the same.  How would I have to change it?  Thanks.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33518448
<How would I have to change it>
Not sure, you never stated what your code is doing..., nor did you post the entire code, or say what event this is on...
;-)

But here is a basic DAO Syntax:

'Declare the Recordset
Dim rst As DAO.Recordset
'Set the Recordset equal to a table, query or SQL string, in the currently open database
Set rst = CurrentDb.OpenRecordset("YourTableOrQueryOrSQL")
    'Move to the first Record
    rst.MoveFirst
    'Loop through the table records, until you reach the end
    Do Until rst.EOF
        'Do Something
        'Move to the next record
        rst.MoveNext
    'Return to the top to loop again
    Loop

'----Object Cleanup
'Close the Recordset
rst.Close
Set rst = Nothing

;-)

JeffCoachman
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Author Comment

by:CaroleTSullivan
ID: 33523731
Boag2000:  thank you for your suggestion but because the ADODB object is used all over the code, I would hate to rewrite this production code UNLESS there is no other alternative.  I'm kinda thinking that some update to the clients machines (because all of them are affected) clobbered something.  I may try having their tech group reinstall MSAccess or something like that.  Thank you again.  I will keep you posted.  should have an answer by Friday.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33525637
I know, I just wanted to see if this even worked...
So we could rule out the connection technique...
0
 

Author Comment

by:CaroleTSullivan
ID: 33534466
the actual error is a compile error....says it cannot load the dll
0
 

Author Comment

by:CaroleTSullivan
ID: 33534947
the actual error is:  Compile Error  Error loading in dll   and it is on this statement.....

Set OBJLocaldbConnection = CurrentProject.Connection
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 33536664

1. Again, can you explain what your ultimate goal is with this code?
Is this the full code?
I don't see where you are declaring: OBJLocaldbConnection

2. When you open the References Dialog box, does anything say "MISSING"?

3. You may need to reinstall this dll...

JeffCoachman
0
 

Author Closing Comment

by:CaroleTSullivan
ID: 33536796
thanks for your help.  a reinstall was in order and DID fix the issue.  take care and thanks again!
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33538417
;-)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Correct ordering 16 48
How to make an ADE file by code? 11 42
Sending Attachment via CDO 3 22
Error in query 3 0
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now