Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

deleted record still appears in local view

Status
Not open for further replies.

phita

Programmer
Jun 8, 2001
82
0
0
KE
Hi,
I am using a local view to access data in a table. I have a form where I create records, with navigator buttons. However, whenever I delete a record and then issue a TABLEUPDATE(.t.), the record still appears in the view. However, if I check in the parent table, it is marked for deletion. DELETED is set to ON so as not to show deleted records in the form. The form has a private datasession so I have set deleted to off in the init of the form.

What could be wrong?

Thanks.

Phita.
 
Phita, until the record pointer is moved off the record it will still be displayed. try using something like

Code:
skip -1
IF BOF()
  GO TOP
ENDIF

After you perform the delete this will move the record pointer and the record will no longer be displayed.

Also personally I would move the SET DELETED ON statement to the BeforeOpenTables event in the data environment. the init of the form may be too late because the tables may already be open by that time

Hope this helps

Ken
 
Hi,
I have even tried to GO TOP after the deletion. However, when I navigate through the view, I get the record still there. But if I browse the table, the record appears deleted.

Thanks.
 
Phita,
did you requery the view?
After the table update try
Code:
REQUERY('VIEWNAME')
 
I haven't tried this. Lemme go and try it and then I will come back to you.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top