Page 1 of 1

Delete last record of a table

Posted: Sun Oct 30, 2005 9:54 am
by Raymond Fischbach
Hello All,

I am facing a problem which is existing in all my browses.
I show a table within a browse.
If i delete a record in the middle of the browse, all work as expected.
The problem is when i delete the last record of the browse (not lthe last record of the table, records can be filtered). The record is correctly deleted but the new last record is displayed twice.
If i close the browse and reopen it, all is ok again.

Posted: Sun Oct 30, 2005 11:04 am
by Antonio Linares
Raymond,

Please do a <oBrowse>:Refresh() after you delete the record. It will force a repaint of the entire browse.

Please let us know if that fixes it. Thanks!

Posted: Sun Oct 30, 2005 4:19 pm
by Raymond Fischbach
Antonio,

Of course I did it. I just forgot to mention it in my post. I even tried to do a gotop() before refreshing but the problem persists.

Thank you anyway,
Raymond

Posted: Sun Oct 30, 2005 6:37 pm
by Antonio Linares
Raymond,

have you tried it in both the emulator and the real Pocket PC ? Do they behave the same way ? Thanks.

Posted: Sun Oct 30, 2005 6:58 pm
by Raymond Fischbach
Antonio,

I did not try it with the emulator but directly on the Pocket PC.

Regards

Posted: Sun Oct 30, 2005 7:41 pm
by Antonio Linares
Raymond,

Please try it also on the emulator. Thanks.

Are you familiar with it ? Let me know if you need some assistance.

Posted: Mon Oct 31, 2005 9:05 am
by Raymond Fischbach
Antonio,

Thank you for your help to install the emulator.

I did install it and tried the application with the same results as in the pocket pc

Here is the code snippet :

@ 14.4,20.5 BUTTON "Sup." SIZE 40, 35 ACTION (SuiDel(aParams,oSui,oSui:Recno()),oSui:GoTop(),oBrw:refresh(),oBrw:SetFocus())

oSui = Tdatabase of the dbf

Thanks for any hint
Raymond

Posted: Mon Oct 31, 2005 9:25 am
by Antonio Linares
Raymond,

Could you modify our provided tutor10.prg sample to reproduce the error ? Thanks,

Posted: Mon Oct 31, 2005 9:34 am
by Raymond Fischbach
Sure, but i will need some time as i have other urgent things to do now.

Posted: Mon Oct 31, 2005 10:44 am
by Raymond Fischbach
Antonio,

I have sent you by prv mail a modified tutor10 that shows the problem.

HTH,
Raymond