Codeunit 448: why recordref instead of record variable for session table

AK
Member Posts: 226
Hi,
I'm wondering about the use of recordref/fieldref to access the session table in function InsertJobQueueSession of codeunit 448 (NAV 2009). It seems unnecessary complicated in contrast to declaring a record variable for the session table, filtering for one field and using the value of another field. Is there some reason I'm missing?
Thanks!
I'm wondering about the use of recordref/fieldref to access the session table in function InsertJobQueueSession of codeunit 448 (NAV 2009). It seems unnecessary complicated in contrast to declaring a record variable for the session table, filtering for one field and using the value of another field. Is there some reason I'm missing?
Thanks!
0
Best Answer
-
I suppose the reason is that the Session table has different ID in Native Client vs SQL Client
SlawekSlawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-035
Answers
-
I suppose the reason is that the Session table has different ID in Native Client vs SQL Client
SlawekSlawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-035 -
Never thought of that, thanks!0
-
Slawek_Guzek wrote: »I suppose the reason is that the Session table has different ID in Native Client vs SQL Client
Slawek
No, the session table is 2000000009 for both Native and SQL backends. You can test this by executing the following...MESSAGE('%1',DATABASE::Session);
...in both types of databases.0 -
Build a fob on one of platforms, a codeunit for example, which accesses session table, say Server Name, and then export it, put into a another platform and run.
Session.SETRANGE("My Session", TRUE); Session.FINDFIRST; MESSAGE('%1', Session."Host Name");
Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-030
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