?
Solved

MSAccess dll missing

Posted on 2010-08-24
13
Medium Priority
?
409 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

771 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