Backend path instead of frontend path? (1 Viewer)

pat_nospam

Registered User.
Local time
Today, 02:25
Joined
Oct 14, 2003
Messages
151
Is there a way to resolve the backend path via code instead of the frontend path?

I'm trying to put something together to check who's logged into the backend, but cannot resolve the path. When I use Current.db, it always gives me the frontend path.

Thanks in advance,

Pat
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 21:25
Joined
Feb 19, 2002
Messages
28,611
Assuming that you have only a single back end db, you can find out its path by looking in the MSysObjects table. Select any row with Type = 6. The path to the be will be contained in the Database column along with the name of the be db.
 

pat_nospam

Registered User.
Local time
Today, 02:25
Joined
Oct 14, 2003
Messages
151
Pat --

Perfect, I've been able to see the Backend path and filename in a query:

SELECT MSysObjects.Database FROM MSysObjects GROUP BY MSysObjects.Database HAVING (((First(MSysObjects.Type))=6));

However, is there a way to hardcode this into the form code and assign to a string so I don't have to call from a query?

Thanks in advance :)
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 21:25
Joined
Feb 19, 2002
Messages
28,611
You could use

DFirst("Database","MSysObjects", "Type = 6")
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom