hi,
i have a doubt with insert...
i do a report that gets a text file and insert the tex into the table 81 and it works fine.
but when i get another txt and do the same, it rewrittes the lines before and don't do nothing.
it seems an error of the setrange or something... anyone can help? i'm so newbbie in this yet..
the code:
81.INIT ;
81.SETFILTER(81.DocNumber,DocNumber)) ;
81."Document No." := DocNumber;
IF 81.INSERT THEN BEGIN
Window.UPDATE(2,TotProcesados);
END;
this is a part of the code it's only to try to understand how i have to do this..
I want to create one line every txt file that i import.
THANKS!!
0
Comments
I don't quite understand, what exactly the fragment of code you gave us is supposed to do and what you do or don't do before.
Please check, what are the primary key values at the time you insert the record.
The counter in your dialog, does is count to more then one plus the initial value? In other words: do your INSERTs succeed? Do you have a reason to ignore failed inserts? If not I recommend to alter that code IF 81.INSERT... to IF the insert fails, you get an error, otherwise the insert is counted
I don't see any reason to set that filter. What do you intend to achieve with it? A filter only causes an effect when you query the database using FIND, FINDSET, FINDFIRST, FINDLAST, NEXT, or when an object does a query implicitly in a Dataitem or the Rec variable on a Form.
i'm executing this report on Nav2013 en when i debug and focus the mouse in var "81" it shows a popup with de key that is using but... i put a setcurrentkey and it doesn't change so...
anyone knows... how can i change the key that shows the debugger when you focus the mouse over the vars.?
thanks...
Maybe you should start with an introduction in C/Side before you continue.
If that is not what you mean, but you want to see another key instead of the primary key values, I don't think that is supported in the current debugger.
|To-Increase|
Regards
Dynamics NAV Developer since 2005