Solved

MSAccess dll missing

Posted on 2010-08-24
13
404 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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
 

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

813 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

12 Experts available now in Live!

Get 1:1 Help Now