Hi,
I have a little example code. Maybe many of you know this but for me it was quite new.
Cust (Record Customer)
Vend (Record Vendor)
Cust.INIT;
Cust."No." := 10000;
Cust.INSERT;
Cust.INIT;
Cust."No." := 10000;
Cust.INSERT;
Message('Customer Insert worked great!\Well done!');
// or any other code without database transaction
Vend.INIT;
Vend."No." := 10000;
Vend.INSERT;
Compare 5.XX or lower with 6.01 R2 Build 32XXX
Even if you try to compile you will notice that there is a difference between 5.xx and 6.01 R2 (or maybe also lower)
The ERROR must occur after the second insert. Normaly the code stops here!? Not in 6.01 R2.
Can someone please verify this and tell me if this is an official behavior?
greetings
mik
Answers
http://www.mibuso.com/forum/viewtopic.php?f=6&t=39628
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
thanks now its clear but changes a lot for developers.
http://msdn.microsoft.com/en-us/library/dd355341.aspx
Thanks Belias!
With kind regards
mik
anyway, i don't see so much difference for the developers except that you have to be "smart" when you debug (you have to forecast the behaviour of the bulk inserts).
It is a cool feature to give a boost to the insert performance, in some instances...
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
you are right. But sometimes it was quite comfortable to let NAV run into an error so you do not have to catch every single case.
I noticed this error because of database operations where after these operations files have been operated. This shocked me quite a lot. So it seems that my coding is quite ok because of the fact that I haven't noticed this befor. But my research is quite bad so I haven't seen this msdn article before ](*,)
Thanks again
With kind regards
mik
Also IF rec.INSERT THEN ... disables the bulk-insert
and also if you use the autoincrement=Yes in the table.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Thats way i said .. "good to know" :idea:
With kind regards
mik