Is there anyway to programatically determine the server name where Navision is running on. I.e. when I go to File->Database->Information, I see the Servername and Database I currently have open. Is there anyway to get access to this information?
No. There is no C/AL command for this. An other approach would be to store the server name in a table in the database and get the name from there. Not as fancy, but it might work for You. //Lars
In table 2000000051 Navision Server you can find the information on the server, nettype, domain, etc. In table 2000000010 Database File you can find interesting stuff on the database. Not only filename, but reads, read time, diskload and other data which might give some insight on performance issues. John
That’s new to me. Thank’s John! //Lars Edited by - Lars Westman on 2001 Oct 12 13:05:38
Although table 2000051 does not tell you which database you are connected to. Only showing you the registered servers from the Directory Service. Perhaps the session table would be of more interest, as this has the fields: Databasename, Applicationname, Login-type at least this works for the Native Navision, haven’t looked at the SQL version. /Soren
In SQL, the session table also gives the open database of the connection.
Thanks for ideas, however, I cannot find any of these tables. As per John:
In table 2000000051 Navision Server you can find the information on the server, nettype, domain, etc. In table 2000000010 Database File you can find interesting stuff on the database.
These tables do not exist in our Navision Database. Are these standard? We are running Navision 2.60.D (SQL version). I have 20000000[2|3|4|5|6|53|54|203] but neither of the 2 mentioned above. As per Soren & Robert:
Perhaps the session table would be of more interest…
Again, I cannot find any such table either. Is there an ID number for it, or is it called something that doesn’t have ‘session’ in the name? Thanks Again, Mark.
Mark, these tables are virtual tables and are not available from the object designer. You can use one of these tables if you define them as a global variable. Take also a look at the virtual date-table, it can be very useful, as first dataitem, when you are making a report. Reijer Edited by - reijer on 2001 Oct 12 21:24:44
To see the “hidden tables” there are many methods. The one that I use is to got to the Form Wizzard, adn drill down on the Source Table field in the opening screen. This will list all the tables. Or you can create a form bases on table 2000000038 AllObj Filter on Type = Table, and you can see all the tables. try the following. download David Singleton Table List _________________________ David Singleton Navision Consultant since 1991 email@example.com___________
How to see the name of the computer the server is running on? If you did a standard installation of the server servive, then the ServerName parameter is identical to the computer name. Lars Strøm Valsted Head of Project and Analysis Columbus IT Partner A/S www.columbusitpartner.com
I am having the same issue. I have looked at all the virtual tables that I thought would hold any information about the server I am connected to. Object 2000000051 only had one record in it which says “[Client Only]”. I guess I will have to resort to adding a field to G/L Setup to store the name for the server. I was also wondering if anyone has contacted Navision about this and if so what did they have to say? Thanks, Bobby Arnold
One can use the C/AL command CONTEXTURL to get the name of the navision server