Problem with table relation

Blach
Member Posts: 6
Hi all
Been a reader of this forum for a long time, and think all of you do an excellent job.
Reason why I've only registered now is that I've got a very strange problem, and I haven't been able to google/search my way to an answer.
Problem is I've got some code that work on a 5.01 client (running ver. 2.60 objects), but the exact same code doesn't work in a 4.03 client (running ver. 2.60 objects aswell).
What I'm doing is, that I insert a rec into a table A, then I insert another rec into another table B.
Table A consists of a number of fields, but the relevant ones are:
ID (Primary Key)
Username
Table B consists of a number of fields but the relevant one is:
UserID (TableRelation to Table A)
When I try to insert the new rec into table B, which have the UserID of the newly created rec (Table A), I get the error:
"Table A ID: <new ID> does not exists"
I have tried doing a commit after the insert into Table A, which didn't resolve the problem. Hope someone out there got an answer to this strange problem.
Been a reader of this forum for a long time, and think all of you do an excellent job.
Reason why I've only registered now is that I've got a very strange problem, and I haven't been able to google/search my way to an answer.
Problem is I've got some code that work on a 5.01 client (running ver. 2.60 objects), but the exact same code doesn't work in a 4.03 client (running ver. 2.60 objects aswell).
What I'm doing is, that I insert a rec into a table A, then I insert another rec into another table B.
Table A consists of a number of fields, but the relevant ones are:
ID (Primary Key)
Username
Table B consists of a number of fields but the relevant one is:
UserID (TableRelation to Table A)
When I try to insert the new rec into table B, which have the UserID of the newly created rec (Table A), I get the error:
"Table A ID: <new ID> does not exists"
I have tried doing a commit after the insert into Table A, which didn't resolve the problem. Hope someone out there got an answer to this strange problem.
Webbruger.INIT; Webbruger.VALIDATE(Brugernavn,bNavn); Webbruger.INSERT(TRUE); KundeWebMap.INIT; KundeWebMap.VALIDATE(KædewebbrugerID,Webbruger.ID); KundeWebMap.VALIDATE("Kundenr.",Rec.Nummer); KundeWebMap.INSERT(TRUE);
0
Answers
-
Have you tried latest NAV 4.00SP3 hotfix? Some builds have problems that they do not see some record etc...0
-
No hot-fixes added to their version. Guess that's going to be the next thing, will just upgrade to 5.01 tho, since I know it'll work in that.
Thanks for the answer Kine0
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