findset(true,true)
garak
Member Posts: 3,263
hy everybody,
when i use findset(true,true) i ask the system, that i will rename the primary key fields. Now my question. For which Pk is this :?:
The primary Navision Key (Key 1) or the clustered key for the sql server :?:
Regards
when i use findset(true,true) i ask the system, that i will rename the primary key fields. Now my question. For which Pk is this :?:
The primary Navision Key (Key 1) or the clustered key for the sql server :?:
Regards
Do you make it right, it works too!
0
Comments
-
It is intended to be used for records sets that you intend to modify values for fields that you used to filter the record set on. So if you set a filter on a certain customer, with the intent of changing the customer, you set the parameter to TRUE. It is used for setting the correct isolation level, so that when you do change the field value, you don't lose your place in the current record set, which could be the case before we got the parameter.0
-
But it is always better to put the record in another variable, and change it in that variable.DenSter wrote:It is intended to be used for records sets that you intend to modify values for fields that you used to filter the record set on. So if you set a filter on a certain customer, with the intent of changing the customer, you set the parameter to TRUE. It is used for setting the correct isolation level, so that when you do change the field value, you don't lose your place in the current record set, which could be the case before we got the parameter.
I read somewhere that you can also use FINDSET(FALSE,FALSE) and do it and it will work well, but it will be less efficient.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
I don't know if it is better, I have not done any comparison. I do know that they included this parameter specifically to enable us to modify filtered fields within the same record set. If that would come at a performance price that would not surprise me.
In smaller loops I don't really think it will make much of a difference, but in larger ones it might. I'd say start out with the easy one and if you have performance issues you introduce more complexity.0 -
hi all,
take a look on my code. i can't understand what is wrong...LProdOrderLine.RESET; LProdOrderLine.SETFILTER("Prod. Order No.",'2007*'); LProdOrderLine.SETFILTER("Line No.",'<99100&>99000|<100'); IF LProdOrderLine.FINDSET(TRUE,TRUE) THEN BEGIN REPEAT LProdOrderLine2 := LProdOrderLine; IF LProdOrderLine."Line No." < 100 THEN LProdOrderLine2."Line No." := LProdOrderLine2."Line No." * 10000; IF LProdOrderLine."Line No." > 99000 THEN LProdOrderLine2."Line No." := LProdOrderLine2."Line No." * 10; LProdOrderLine2.MODIFY; UNTIL LProdOrderLine.NEXT = 0; COMMIT; END;
i get an error on LProdOrderLine2.MODIFY saying that the record doesn't exist.
help please!
thanks in advance[/code]0 -
/nod
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

