Hi,
I was trying to find out the keys of some tables of NAV (native Db). I did it with the following code in a report / form and populated a table with the keys:
RecRef RecordRef
i Integer
Keys Text 250
ObjectList Record Object List
ValidateTable Record Field
FOR i := 1000000 to 10009999 DO
//Just a specified range of tables
BEGIN
ValidateTable.RESET;
ValidateTable.SETRANGE(TableNo,i);
IF ValidateTable.FINDFIRST THEN
BEGIN
RecRef.OPEN(i);
Keys := '';
Keys := RecRef.CURRENTKEY();
IF Keys <> '' THEN
BEGIN
ObjectList.INIT;
ObjectList."Object No." := i;
ObjectList."Object Caption" := Keys;
ObjectList.INSERT;
END;
RecRef.CLOSE;
END;
END;
Note: I cannot take a backup of the db and restore on SQL server. I only have access to the NAV db with limited administrative permissions
Is there any other better way to do this?
Kind regards,
Chn
0
Answers
Thanks!
Chn
Exactly. Just filter on "Key ID" = 1 :thumbsup:
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool
:thumbsup:
Chn