Link to home
Start Free TrialLog in
Avatar of CaroleTSullivan
CaroleTSullivan

asked on

MSAccess dll missing

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.
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Make sure the Microsoft ADO library is loaded in the VBA references

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

;-)

JeffCoachman
Avatar of CaroleTSullivan
CaroleTSullivan

ASKER

it is.  That is the wierd thing.  
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

...Also, can you try this with DAO and see if that will work...?

(Obviously you must Load the MS DAO library, in the VBE)
regarding using DAO .... is the code the same.  How would I have to change it?  Thanks.
<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
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.
I know, I just wanted to see if this even worked...
So we could rule out the connection technique...
the actual error is a compile error....says it cannot load the dll
the actual error is:  Compile Error  Error loading in dll   and it is on this statement.....

Set OBJLocaldbConnection = CurrentProject.Connection
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks for your help.  a reinstall was in order and DID fix the issue.  take care and thanks again!