Hi everybody,
does anybody know how to find out if the database I'm working in is connected to the server or if I'm working local? I mean the information shown in the connection-tab using the path "file>database>information". I need to know that in a procedure to decide which function should be used and I can't find this information in any of the tables given, even not if search the "invisble tables" using a form.
Any ideas?
Thanks a lot.
Best regards,
N. Gebhard
ProTAKT Projekte & Business Software AGMicrosoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt 0
Comments
I tried as you have to look for a function or something similar that would reveal that information. Didn't have any luck.
Have you considered alternative methods for determining this? Ie. to check the name of the current database? If you are lucky then the database you are running locally vs. the one the server runs are not located on the same drive or in the same folder. They may even be named differently. Thus you could hardcode (slaps my own wrist) the name of the server's database and check the name at runtime. This info is located in the virtual table "session" btw.
Tommy
I make so that I rename the Company in my Local Databases.
So I can see directly/quickly if i am work on the Server or on a local Database.
Navision makes Temporary Files in a Path, you can try the option that your Server Database put this Files in a defined Path and for Local Databases Configure so that Navision put the Files in another Temp Path.
So you can see every Time if Temporary Files in a Path that you a working on it.
Note especially that
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
In my function on main menu I parsed the result of contexturl to display this msg:
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Main Manu - OnOpen I call:
tServerName := ADGetServerDBInfo('servername=');
tServerType := ADGetServerDBInfo('servertype=');
tDatabaseName := ADGetServerDBInfo('database=');
...to show data on 3 controls. Of course you can put a function call directly in source expression
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
I am able to solve the problem now...
Microsoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt