Migrating DB from classic to SQL
clembo
Member Posts: 122
I've a strange problem.
Migrating old Nav version to new Sql version (classic client 2009) I have found a problem in a form.
This form is same thath in old version.
This is the code:
Strange thing is that record in filter form is 10 but in code it found only four!!!
Migrating old Nav version to new Sql version (classic client 2009) I have found a problem in a form.
This form is same thath in old version.
This is the code:
Locrec := Rec;
NrRec := 0;
NrRecToInvoice := 0;
NrRecInvoiced := 0;
NrRecordIncomplete := 0;
IF FIND('-') THEN
REPEAT
CASE Stato OF
Stato::"ToInvoice" : NrRecToInvoice := NrRecToInvoice + 1;
Stato::Invoiced : NrRecInvoiced := NrRecInvoiced + 1;
Stato::Complete :
BEGIN
NrRec := NrRec + 1;
Stato := Stato::"ToInvoice";
MODIFY;
END;
ELSE
NrRecordIncomplete := NrRecordIncomplete + 1;
END;
UNTIL NEXT = 0
ELSE
ERROR('Nessun record è stato selezionato!');
IF (NrRec + NrRecToInvoice) = 0 THEN
ERROR('No record FOUND to invoice!');
IF CONFIRM(STRSUBSTNO('Found\' +
'%1 record incomplete\%2 record complete\' +
'%3 record to invoice\%4 record invoiced\\'+
'Continue?',NrRecordIncomplete,NrRec,NrRecToInvoice,NrRecInvoiced),TRUE)
THEN
BEGIN
Rec := Locrec;
"State filter" := "State filter"::"To invoice";
"ApplyFilter";
END
ELSE
ERROR('');
Rec := Locrec;
Strange thing is that record in filter form is 10 but in code it found only four!!!
0
Comments
-
Have you tried to use FINDSET instead of FIND('-')?0
-
SQL Sorts code fields differently.
SQL:
1
10
100
2
20
200
Navtive:
1
2
10
20
100
200
Is this your problem?0 -
I agree with Mark. It is probably a sorting /filter issue. If you have a filter like this: "1..100" in native, all numbers between 1 and 100 is found. In SQl only 1, 10 and 100 is found.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
