private void processCounting() { int nomor, no, angka, NC3, NC4, NC5, NC6, NC7, NC8, NC9, NC10, NC11, NC12, NC13, NC14, NC15, NC16, NC17, NC18, NC19, NC20, NC21; while select pibCount group by NoBuktiPIB, KodeBarang, RecId where pibCount.createdBy == CurUserId() { //JUMLAH BARANG select count(KodeBarang) from pibCount2 where pibCount2.NoBuktiPIB == pibCount.NoBuktiPIB && pibCount2.RecId == pibCount.RecId && pibCount2.createdBy == CurUserId(); nomor = any2int(pibCount2.KodeBarang); //UPDATE JUMLAH BARANG ttsBegin; select forUpdate pibUpdate where pibUpdate.createdBy == curUserId() && pibUpdate.NoBuktiPIB == pibCount.NoBuktiPIB && pibUpdate.KodeBarang == pibCount.KodeBarang && pibUpdate.RecId == pibCount.RecId; EU_TBL_KITEPIBtmp.clear(); EU_TBL_KITEPIBtmp.JumlahBarang = nomor; EU_TBL_KITEPIBtmp.doUpdate(); ttsCommit;
What happen with this record never been selected ?
this the variable code :
EU_TBL_KITEPIBtmp EU_TBL_KITEPIBtmp,EU_TBL_KITEPIBtmp2,EU_TBL_KITEPIBtmp3,EU_TBL_KITEPIBtmp4, pibCount, pibUpdate, pibCount2, pibCount3, pibCount4, pibCount5, pibCount6, pibCount7, pibCount8, pibCount9, pibCount10, pibCount11, pibCount12, pibCount13, pibCount14, pibCount15, pibCount16, pibCount17, pibCount18, pibCount19, pibCount20, pibCount21, pibUpdate3, pibUpdate4, pibUpdate5, pibUpdate6, pibUpdate7, pibUpdate8, pibUpdate9, pibUpdate10, pibUpdate11, pibUpdate12, pibUpdate13, pibUpdate14, pibUpdate15, pibUpdate16, pibUpdate17, pibUpdate18, pibUpdate19, pibUpdate20, pibUpdate21;
in my debbuger its already selected, already add clear buffer. what i missed ?
Thanks for your reply. And I am glad to see you had find the RCA now. :)
Can you help mark it as verified if the answer is helpful.
Also, normally it's good to call update() instead of doUpdate() since otherwise any custom logic in the update() method is not called. And also for cross-references it's better if you call update, then it's possible to find this code later if you want to find all classes that update your table.
[/quote]thanks nikolaos for reply,
i want to try create new table with insert() method. so it will clear the case with newbie method hahaha
and get those datas with EU_TBL_KITEPIBtmp where clause joining with pibUpdate
will find soon for the definition about it thanks
This issue should caused by EU_TBL_KITEPIBtmp.doUpdate(). Why you select forupdate pibUpdate, but use EU_TBL_KITEPIBtmp to update.
Suggest change EU_TBL_KITEPIBtmp to pibUpdate. Hope this can help you.
[/quote]thanks xusheng for reply. but you know sometimes we had to use newest variable so our main variable is not clash with that our new data. i always do that and works. but now i dont know why. but i think i should create new table and use insert() rather than update() for newbie like me hahaha
Hi Ardhi,
You have defined that table, but you never selected;
EU_TBL_KITEPIBtmp.clear();
select firstOnly EU_TBL_KITEPIBtmp;//(ofcourse with where clause)
// OR
EU_TBL_KITEPIBtmp = pibUpdate;//I cant see your table
EU_TBL_KITEPIBtmp.JumlahBarang = nomor;
EU_TBL_KITEPIBtmp.doUpdate();
[/quote]thanks ergun for reply. i always did that code for another project. but just in my case here it didnt want to processed. i think i should create new table so i wouldnt use update() anymore
A general solution for avoiding the error "record has never been selected" is to check that you have a record at hand before trying to update.
So, before calling update on a record, check that the buffer has a RecId.
About this specific situation, it's not clear what you are trying to do and therefore it's not possible to suggest detailed solution.
[/quote]thanks Nikolaos for reply, thanks for that information. but in my debugger that already detected the recid. but when i already include where clause with recid in it, it dont get the recid.
Also, normally it's good to call update() instead of doUpdate() since otherwise any custom logic in the update() method is not called. And also for cross-references it's better if you call update, then it's possible to find this code later if you want to find all classes that update your table.
This issue should caused by EU_TBL_KITEPIBtmp.doUpdate(). Why you select forupdate pibUpdate, but use EU_TBL_KITEPIBtmp to update.
Suggest change EU_TBL_KITEPIBtmp to pibUpdate. Hope this can help you.
Hi Ardhi,
You have defined that table, but you never selected;
EU_TBL_KITEPIBtmp.clear();
select firstOnly EU_TBL_KITEPIBtmp;//(ofcourse with where clause)
// OR
EU_TBL_KITEPIBtmp = pibUpdate;//I cant see your table
EU_TBL_KITEPIBtmp.JumlahBarang = nomor;
EU_TBL_KITEPIBtmp.doUpdate();
A general solution for avoiding the error "record has never been selected" is to check that you have a record at hand before trying to update.
So, before calling update on a record, check that the buffer has a RecId.
About this specific situation, it's not clear what you are trying to do and therefore it's not possible to suggest detailed solution.
I'm sorry, but I don't understand your requirement. Could you give us a concrete example of what you're trying to achieve, please?
Also, can you please tell us why you're using so many variables with names differing just by an index? We should be able to suggest a better design (easier to write, read and maintain), such as using a collection class.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,900 Super User 2024 Season 2
Martin Dráb 229,275 Most Valuable Professional
nmaenpaa 101,156