Problem with bit data type of SQL in NAV 2009
hav
Member Posts: 299
Hi all,
I have use-case mentioned below for resolving my problem.
WMDATA db. //3rd party database
Table --> WMProductionBatch
Column --> Issued
Data type --> bit
NAVDATA db. //NAV demo database
Linked Table --> WMProductionBatch
Column --> Issued
Data type --> Integer
A tabular form 'ProductionBatches' is created for WMProductionBatch linked table in NAV.
A menubuttion "Production Batch" is added to this form having menuitem as 'Card'.
The Card menu-item has OnPush() trigger defined as below:
This means that the mapping Issued column in NAVDATA db. should change from 0 to 1. But what happens actually is that when
IssuedAfter := WMProductionBatch.Issued;
is executed, the var. IssuedAfter (of type Integer) does not contain the current value as 1.
I tried debugging in VS2005 but i didn't got any idea as to why the bit value is not assigned to Integer value.
I need some help to resolve this.
Thanks
Hemant
I have use-case mentioned below for resolving my problem.
WMDATA db. //3rd party database
Table --> WMProductionBatch
Column --> Issued
Data type --> bit
NAVDATA db. //NAV demo database
Linked Table --> WMProductionBatch
Column --> Issued
Data type --> Integer
A tabular form 'ProductionBatches' is created for WMProductionBatch linked table in NAV.
A menubuttion "Production Batch" is added to this form having menuitem as 'Card'.
The Card menu-item has OnPush() trigger defined as below:
Card-OnPush()
{
TestUnit.OpenProductionBatch(Rec);
//where TestUnit is a codeunit
//Rec is a record variable of type WMProductionBatch linked table
}
The function is defined as below:
OpenProductionBatch(VAR WMProductionBatch : Record WMProductionBatch)
{
//IssuedBefore is of type Integer
//IssuedAfter is of type Integer
IssuedBefore := WMProductionBatch.Issued;
//do some processing on batch
.....................
CLEAR(WMProductionBatch);
//Check if batch is issued
IF WMProductionBatch.GET(LocNo, BatchNo) THEN
[color=#FF0000]IssuedAfter := WMProductionBatch.Issued;[/color]
IF (IssuedBefore = 0) AND (IssuedAfter = 1) THEN
//do some task
}
The problem i face is that when i process the batch, the Issued column (bit type) in WMDATA db. changes from 0 to 1.This means that the mapping Issued column in NAVDATA db. should change from 0 to 1. But what happens actually is that when
IssuedAfter := WMProductionBatch.Issued;
is executed, the var. IssuedAfter (of type Integer) does not contain the current value as 1.
I tried debugging in VS2005 but i didn't got any idea as to why the bit value is not assigned to Integer value.
I need some help to resolve this.
Thanks
Hemant
Regards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
0
Comments
-
Any help relating this problem will be appreciated.
Regards,Regards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)0 -
Have you set the property "LinkedInTransaction" to "Yes" of your "Linked Object" table?Jörg A. Stryk (MVP - Dynamics NAV)
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool0 -
No.
The LinkedInTransaction property is set to No.Regards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)0 -
If you set it to "Yes", does it work then?Jörg A. Stryk (MVP - Dynamics NAV)
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool0
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
- 322 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