How to: Get record count for all tables

In newer Nav versions the tables overview in development environment/database information has gone. So how to get that list back ? Let’s got to SSMS (Sql Server Management Studio). There select the database, for which you want that information. Right click on database -> Reports -> Standard Reports -> Disk usage by Top Tables There we… Continue reading How to: Get record count for all tables

Error: Table 2000000009 has no name

If you get following error: then the database is corrupted. In detail it means sql view “Session” is missing in the database! This can be a result of a crashed backup/restore process or a failed conversion process. It can be, that View “Database File” is also missing. Although it is possible to restore the missing view… Continue reading Error: Table 2000000009 has no name

Sql Statements in C/AL – Part 2 : Create View

The following code can be used to create a sql view in a given, external database. // local variables ADOConnection Automation ‘Microsoft ActiveX Data Objects 2.8 Library’.Connection ADOCommand Automation ‘Microsoft ActiveX Data Objects 2.8 Library’.Command ADORecSet Automation ‘Microsoft ActiveX Data Objects 2.8 Library’.Recordset connString Text 1024 activeConnection Variant viewName Text 100 // the code //… Continue reading Sql Statements in C/AL – Part 2 : Create View

Sql Statements in C/AL – Part 1 : Select

There is no possibility to read data from an external database with standard c/al. Best way to do that till NAV version 2009 is using ADO. With Nav vs. 2013 upwards you can use .Net classes. The following code can be used to read data from a given, external database. // local variables ADOConnection Automation… Continue reading Sql Statements in C/AL – Part 1 : Select