Get NAV Table fields definition direct from SQL

Hi,
simple question :-)Is it a possible find NAV Table definition direct from SQL. Concretely I mean Fields Name, Fields ID (maybe Type, Description, Relation… or other)

I have just written simple app in C# and I’m reading this data from an exported table (txt file). But this is not dynamical at changes in NAV. :confused:

Thanks for info ;)

Yes you can find the same but you can not have any information of flowfield which are logical fields in Navision . So you will get information of static fields only.

Have a look at the system table 2000000041 Field. This table contains a list of all of the fields for each table in the database. You should be able to get most of the data you’re looking for from this table. Don’t write to it using SQL though.

I am interested in the syntax of the SQL Statement that will return all table names in a Navision Database so I can implement a routine to loop through all tables for data.

Select ?Table_Name? from ?List_Of_Tables? INTO My_Array;

Also the syntax for the fields would be interesting to know

Select ?Field_Name? from ?List_Of_Fields? INTO My_Array;

You help is highly appreciated!

the get the field names in sql you can use the sql system tables.

select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS
where TABLE_CATALOG =
and TABLE_NAME =
– and ORDINAL_POSITION =