Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to delete a free table record?
Message
From
17/05/2002 04:48:32
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
17/05/2002 03:39:18
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00658004
Message ID:
00658044
Views:
20
You should not use SELECT 50.

This makes your code much harder to read/debug. To open a file called patients.dbf just do this..


if not used("patients")
select 0
use patients.dbf
else
select patients
endif

>>Set deleted on
>>would be good not to show deleted records.
>>PS: Since you use buffering do you really need scatter-gather approach. You might directly use tables and do a tableupdate() to commit (like gather) or tablerevert() to discard. If delete is on a new record you don't need to delete it just tablerevert(). But if that sounds complex you can still use scatter-gather:)
>
>
>Cetin:
>
>I am still having trouble. Its doing the same thing again i.e., shows records that I deleted.
>Here is what I have in the Init()
>
>
select 50
>use patient order tag last_name of patient.cdx
>set safety off
>set deleted on
>set multilock on
>CURSORSETPROP("Buffering", 5, "patient")
>
>GotFocus() has - thisform.refresh()
>
>Destroy() has:
>
select 50
>use
>close tables
>
>Delete click Event:
>
delete
>tableupdate()
>skip
>if eof()
>	go bottom
>endif
>thisform.release()
>
>Exit button has:
>
set safety on
>thisform.release()
>
>The Buffer Mode in the properties window of the form is set to 2-Optimistic. This is a form that I have inherited.
>
>Do you find anything odd here that may be causing the problem? TIA.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform