In NAV 2016 (W1, build 45480) I exported a company from database DB1 as a .navdata file.
I then tried to import the .navdata into database DB2, and got an error:
“The specified file contains a table with the ID 50011 that does not exist in the application database.”
However, in DB1 I cannot see any table 50011, while in DB2 there actually is a table with ID 50011.
Because of the urgency (and because we only need one company, and have no problem deleting the other companies) I ended up taking a SQL backup of DB1, and restored that as DB3.
But there are other situations where we actually want to use different companies from different databases.
Have you ever encountered this error? Do you know of possible solutions?
Alastair Farrugia
0
Answers
As far as I know, the source database and target database should have the exact and same objects (tables). Otherwise, import navdata will not work.
So do you mean that the solution would be as follows?
a) import table 50011 into DB1
b) export the company (which would now explicitly have blank data in table 50011)
c) import the company into DB2
That makes sense, but the error message I received was misleading, to say the least.
Regards
Alastair
For step a), I would say export all objects from source database, and import them to target. this way, you're more than sure you have the same objects on both sides
Also, even if the table exists and not compiled, you'll get the same error.
However, please note that in this case there was a table on the target database that was missing from the source.
I only want to import that missing table (from target to source), since the source objects are generall more recent that the target objects.
Do you mean using an xmlport to export and import the missing table ? I can just use a .fob - I don't understand how an xmlport would help.
Presumably, I don't need any data in table 50011, to be able to import a .nadvata file
Alastair
That is correct.
To sum up:
1- if you want to export/import entire company (companies) then you could use navdata. For this, you need to have the same objects on both databases. You could also use SQL backup as you already did.
2- if you want to export/import some tables only then you could use XMLports or any alternative (configuration package for example).
I hope this summarize and clarify what we use for what