How can I get a Constant value from in an mde file? (1 Viewer)

marlan

Registered User.
Local time
Today, 10:42
Joined
Jan 19, 2010
Messages
409
Hi All you experts!

I am trying to, programmatically, receive a constant values defined in a VBA module, in other applications - all *.mde files.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 03:42
Joined
Feb 19, 2002
Messages
43,858
Code is not accessible in an .mde. Besides, modules don't store data. Tables store data.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 03:42
Joined
May 21, 2018
Messages
8,705
You can create a library db and add as a reference then you can access public constants. But that would require a non changing path. If these are common constants used in code i would distribute in a table like Pat said. What exactly are you doing?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 00:42
Joined
Oct 29, 2018
Messages
21,646
Can you show us what you've tried so far?
 

isladogs

MVP / VIP
Local time
Today, 08:42
Joined
Jan 14, 2017
Messages
18,312
I am also curious about why you would want to do this.

Even in an encrypted ACCDE or MDE, the definitions and values of public constants CAN be viewed. For example:

1623004568192.png


AFAIAC, this is a potential security issue that should have been fixed years ago.
For that reason, I'm not going to provide any assistance in ways of retrieving the values externally.

Having said that, I agree with the comments made by both @Pat Hartman and @MajP.
If these are your own databases and you need to get the values of public constants externally, make the MDE a library reference database or better still, put the values into a settings table. If the values are for 'sensitive' data such as passwords, make sure you encrypt them to prevent anyone viewing the values without authorisation.

If you are trying to hack into someone else's databases without authorisation, then I'll just say it can be done but I'm not going to provide details
 

marlan

Registered User.
Local time
Today, 10:42
Joined
Jan 19, 2010
Messages
409
Hi guise, thanks a lot for your replies!

It is an issue of version managing, and in this case we thought of this as a one time job, for getting our current version situation.

We'll just have to do it in an other way..

Thanks again!
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 08:42
Joined
Jul 9, 2003
Messages
16,447
I thought about approaching your problem from a slightly different angle. You can create a Custom Database Property where you can store version numbers and the like. I've done a YouTube Video:-

Custom Database Property - Nifty Access​


And a Blog on my website here:-

Custom Database Property​

 

isladogs

MVP / VIP
Local time
Today, 08:42
Joined
Jan 14, 2017
Messages
18,312
If the purpose is version info, I would just store it in a settings Table and/or a text file in the same folder.
Either of those would make retrieving the value very simple
 
Last edited by a moderator:

Users who are viewing this thread

Top Bottom