Options

Strange TableData doesn't exist error with changing number

Miklos_HollenderMiklos_Hollender Member Posts: 1,598
I have an XMLPort that imports into a temptable then writes into the real table using changecompany. (Because I don't want to run a NAS session for each company, obviously. Nor do I want to delete existing records, just overwrite them.)

So at the changecompany I get a TableData xxx doesn't exist error, but the actual number is different in every run! Even though I import to the same table.

For example TableData 2000100041, or 2000100034, or 2000100045 when I actually import into the table 27 for example.

Such tables never existed.

I suspect a client error - I use Classic, SQL, 6.0 SP1 (6.00.29626)

Is there a workaround? And/or is it confirmed to be fixed in a later hotfix/SP?

Comments

  • Options
    jreynoldsjreynolds Member Posts: 175
    The only reference I have ever seen to such table numbers is in the Help for the TABLENO function:
    In previous versions of Microsoft Dynamics NAV, if a RecordID referred to a temporary table, then the table number value of the RecordID was the run-time generated sequence ID, which is from the base value of 2000100000. You could use the table number to determine if a RecordID referred to a temporary table. In Microsoft Dynamics NAV 2009, the table number value of a RecordID always contains the ID of the originating physical table and not the run-time generated sequence ID. If you previously used the TABLENO Function (RecordID) to test for the sequence number and determine if the RecordID was temporary, then you use the ISTEMPORARY Function (RecordRef) in Microsoft Dynamics NAV 2009 instead.

    This definitely relates to temporary tables. I'm not sure if there is any connection to CHANGECOMPANY but this might give you some ideas.
  • Options
    Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    Hold on, I am an idiot, trying to changecompany the temptable that was imported into, not the real table it goes into.

    Solution: get some sleep.
Sign In or Register to comment.