Version Check

Is there any way to identify which version of Navision a particular database is on? I’m looking at native databases in particular.

There is a function in codeunit 1 that returns the version.

Why do you need this? Basically can’t you just ues the functionality in CU 1?

Are you talking about the Navision Application version or the version of the Navision executable ?

Take a copy of the database. Open with your ‘local’ client. Check in CU1. Of just check the help, about. click-click on the Version to get the Build Number.

The reason for the need is where I’m supporting a large number of customers on different versions of Navision & I want to ensure that I use a suitable client to open the database and not convert the database. I had hoped that the version was stored in a table & I could query it with the ODBC add on or something.

Hello If the version was recorded in a table (Unfotunately it is not) you would still need to know which version they are running to use the ODBC tool. For databases that we are not running as services, we keep in folders that identify the version, for example: Database(GB370) For those running as services we keep the version logged elsewhere and check before openning. Alternatively you could include the version in the service name (e.g. BisCo401). The simplest way to find out what version of objects & executables a client is running, ask them to open the client and check under Help → About Microsoft Business Solutions-Navision The executables are in brackets. If all else fails, Navision will warn you that you are about to an onld database in newer executables and give you the option to change your mind. Hope this is of help.

There’s no way with the Native database - it is stored in the database in a control block (actually it is possible because you can interpret the bytes of the control block but that is not a practical solution). With SQL it is stored as a number in the DatabaseVersionNo column of the [$ndo$dbproperty] table in the database, which can be mapped to a Navision version. I will dig the mappings out and post them later.

Here are the database version numbers (DatabaseVersionNo column of [$ndo$dbproperty]) for SQL and the corresponding Navision versions that use them: Database versions for: 2.50 1 : Beta 1 data formats 2 : Beta 2 data formats (change in Code field value format from space-padded prefix to hex prefix) 3 : Beta 3 data formats (change in Code field value format from hex prefix to no prefix or special format) 4 : Release data formats (SIFT trigger identifiers changed and new indexes on SIFT tables) Database versions for: 2.60(A->C) 5 : Release data formats (change in Session view and SIFT triggers to use CONVERT rather than CAST for datetime fields) Database versions for: 2.60(D->F) 6 : Changes in SIFT triggers due to UPDATE... WHERE... performance problem Database versions for: 3.00 7 : Beta 1 data formats (change in Session view for SQL Server 2000; change in chartable) 8 : Beta 1 data formats (change in chartable; changes in SIFT triggers due to UPDATE... WHERE... performance problem) 9 : Beta 1 data formats (added maintainviews dbproperty) 10 : Beta 2 data formats (mapped invalid characters to "_" for SQL object identifiers) 11 : Release data formats (added diagnostics dbproperty) Database versions for: 3.01, 3.01A, 3.01B 12 : Release data formats (added identifiers dbproperty) Database versions for: 3.10, 3.10A 13 : Release data formats (added maintainrelationships dbproperty) Database versions for: 3.60 14 : Release data formats (change in Session view for new extensions; identifer conversion dbproperties; per-database license dbproperty) Database versions for: 3.70 15 : Release data formats (change in chartable; added checkcodepage, quickfind, maintaindefaults dbproperties; change in Session view for new extensions and column COLLATE; change in Database File view for column COLLATE) 16 : Hotfix 5 data formats (change in Session View for removing duplicate connections based on 'sysprocesses.ecid') 17 : Hotfix 12 data formats (change in Session View for removing duplicate connections based on 'sysprocesses.ecid'; the identifiers and invalididentifierchars dbproperties are updated to OEM) 18 : 3.70B data formats (change in Session View, removing join to syslockinfo; also removed from session count query) Database versions for: 4.0 20 : Pre-release data formats (change in Session view for new Idle Time column; change in permission table to include new object types) 30 : Security release data formats (change in Session view, removing join to syslockinfo; change in chartable; creation of security objects) Database versions for: 4.1 40 : Release data formats (added locktimeout, locktimeoutperiod, hardrowlock and bufferedrows dbproperties)

Many Thanks