Table does not exist - error on importing .navdata

afarrafarr Member Posts: 287
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

Best Answer

Answers

  • NavNabNavNab Member Posts: 181
    Hi Alastair,

    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.
  • afarrafarr Member Posts: 287
    Hi Nabil,

    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
    Alastair Farrugia
  • afarrafarr Member Posts: 287
    edited 2017-06-23
    Thanks for your help. I have marked this as solved.

    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.
    Alastair Farrugia
  • JuhlJuhl Member Posts: 724
    Then do a export/import via xmlport.
    Follow me on my blog juhl.blog
  • afarrafarr Member Posts: 287
    Hi Juhl,
    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
    Alastair Farrugia
  • NavNabNavNab Member Posts: 181
    I believe @Juhl is talking about data in your table.
    afarr wrote: »
    Presumably, I don't need any data in table 50011, to be able to import a .nadvata file

    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 :)
Sign In or Register to comment.