Microsoft DAO Library (1 Viewer)

khurram7x

Registered User.
Local time
Today, 22:23
Joined
Mar 4, 2015
Messages
226
Hi,


[FONT=&quot]I could not load ‘Microsoft DAO 3.x Object Library’ for Access x64. I can see the required DLL file, but when I try to load it gives me ‘Error in loading DLL’!![/FONT]

I need to get this fixed to work with some older DAO code. Could not get enough help from internet to sort this out.

Jet Database Engine ACE, Microsoft office 14.0 access database engine object library, is already checked.

Attaching screenshot of the code, with line of error highlighted in Yellow.

Thanks,
K
 

Attachments

  • DAO Error.JPG
    DAO Error.JPG
    52 KB · Views: 158

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 12:23
Joined
Feb 28, 2001
Messages
27,314
How is DAO_OR_ADO defined? What is its data type? The error message suggests that it was defined in a way that requires an enumerated value (i.e. integer) in that location, not a string.

There is a great big clue in that you are saying you have the x64 version of Access, but I wonder if that is the correct library for x64. My x32 version uses Microsoft DAO 3.6 Object Library, C:\Program Files (x86)\Common Files\Microsoft shared\DAO\dao360.dll, which is in the 32-bit program files subdivision.

MS Access 2013 is version 15.0, so I'm thinking that version 14.0 is Ac2010. There was no significant difference between DAO libraries (other than perhaps a version number) for x32 between Ac2010 and Ac2013. They are compatible as far as I know. Therefore, you shouldn't need to back-track DAO libraries at all. Stated another way, I've NEVER had a problem with code developed in Ac2003 (x32) running with newer DAO libraries for Ac2013 (x32). They just work!

If you have a problem, I'm thinking it is that the DAO libraries for x64 might be different because of the x64 argument-passage differences having to do with "safe pointers" that use 64-bit rather then 32-bit addressing. I'm also not going to swear that the DAO library for x64 uses the same naming style, having not played with the 64-bit version at that level.

The fact that you have an older library doesn't mean it is a compatible library because of the differences imposed by the x32-to-x64 conversions.

By any chance was the original code developed on an x32 system?
 

khurram7x

Registered User.
Local time
Today, 22:23
Joined
Mar 4, 2015
Messages
226
...
By any chance was the original code developed on an x32 system?
Thank you DocMan. Actually I've purchased a small utility over the internet to put restrictions and username/password mechanism for MS Access database. It is called LASsie (Light Application Security) and is available @ http://www.peterssoftware.com/las.htm

I've tried to contract Mr. Peter from the above site, but feels like he's not interested in answering after sales!

It is sort of urgent for me to make something like this work, that's why referred to forum.

There's a trial version of the program on site. I'm attaching the full VBA code, part of which is giving me troubles.

Thanks,
K
 

Attachments

  • LASsieCode.zip
    22.7 KB · Views: 80

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 18:23
Joined
Sep 12, 2006
Messages
15,701
you shouldn't need to declare DAO. DAO is already active in the normal libraries.

As DocMan says, are you using 64-bit Access. This is likely to be the issue. Alternatively the product you purchased just may not be compatible with Access 2010
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 12:23
Joined
Feb 28, 2001
Messages
27,314
Or the product might not be compatible with 64-bit access. SafePtr issues hit every call, even the implied ones based on DLL linkages.
 

khurram7x

Registered User.
Local time
Today, 22:23
Joined
Mar 4, 2015
Messages
226
If I define 'Dim db AS Object' or only 'Dim db' which will be a variable type, program works OK and compile successfully.
It does not work when I rewrite as 'Dim db As Database'.
Does it make a difference if I define db as Variant or Object type please?

Product is advertised for Access 64-bit. That is why I purchased. But whatsoever, support is not replying once they've sold me the product, but their replies were pretty quick when I was querying about the product before sale.

Regards,
K
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 18:23
Joined
Sep 12, 2006
Messages
15,701
try

dim db as dao.database

on reflection, maybe it is an object, and not a "database" data type.
 
Last edited:

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 12:23
Joined
Feb 28, 2001
Messages
27,314
"Database" should be qualified as DAO.Database or ADO.Database in order to declare it. Otherwise, you are subject to the arbitrary nature of the order in which the libraries are declared. If you use both DAO and ADO at the same time, whichever of those two libraries is declared first will win for implied references - but not for qualified references.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 12:23
Joined
Feb 28, 2001
Messages
27,314
Product is advertised for Access 64-bit. That is why I purchased. But whatsoever, support is not replying once they've sold me the product, but their replies were pretty quick when I was querying about the product before sale.

There, my brother, I feel your pain. We get that a lot from vendors trying to sell us stuff, too. Quick to respond until the check is signed, and then it is dead silence. Even if the check is so freshly signed that the ink isn't dry yet. Even if the customer is the U.S. Navy (as in my case), technical support is hard to contact and, no matter where you are located, somehow their first-line responders don't speak your language as a native speaker thereof.
 

Users who are viewing this thread

Top Bottom