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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete record?

Status
Not open for further replies.

august

MIS
Aug 24, 2000
150
PH
How can i delete record in shared mode?

august [sig][/sig]
 
Nice question. Did you read a help on DELETE command?
I usually set 3-d buffering mode for table, than Delete, than taleupdate(). Ouh, yes, always ask user for confirmation to delete. [sig]<p>Volodymyr Grynchyshyn<br><a href=mailto:vgryn@softserve.lviv.ua>vgryn@softserve.lviv.ua</a><br>[/sig]
 
August, I'm going to try to read between the lines of your question (which is especially difficult, since your question is only one line), and guess that you mean: how can I delete a record in shared mode and have it disappear?

When a table is opened in shared mode, you cannot PACK it, and therefore records marked for deletion may still appear...unless you issue the command SET DELETED ON. [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
in your set of 'set commands' - in the place where you set
SET TALK OFF
SET MULTILOCKS ON
..
etc..
add the following set command
SET DELETED ON
Whenever you delete a record, the deleted record is not displayed with this SET DELETED ON. However, when you stay on a record and DELETE the record, the record pointer stays on that deleted record. So to enable the disapperance of the record, it is ideal to make a SKIP or SKIP -1 suitably depending on if you stay in the BOF() or EOF()... so to code this in the event deleteing the record.. put the code..

SKIP
IF EOF()
SKIP -1
ENDIF
ThisForm.MyGrid.REFRESH()

This will delete the record and remove it from the display.
All the TABLEUPDATE etc to be done as it shall be done. ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top