Strange TableData doesn't exist error with changing number

Miklos_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?
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?
0
Comments
-
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.0 -
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.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions