Vasile Buza
2004-01-22 14:11:32 UTC
Plus 2.01 & Plus 2.20
Under dBASE Plus, when APPEND have a FOR clause, records marked for
deletion from source table are added.
For example :
*******
/*
from the OLH....
for APPEND FROM...
If SET DELETED is OFF, dBASE Plus adds records from a source dBASE table
that are marked for deletion
and doesn't mark them for deletion in the current table.
If SET DELETED is ON, dBASE Plus doesn't add records from a source dBASE
table that are marked for deletion.
-------------------------------------------------------------------------
---------------------------------------------
*/
set safety off
SET DELETED ON
close tables
if file('SALES.DBF')
erase ('SALES.DBF')
endif
CREATE TABLE SALES ( SALESID SmallInt, text CHAR(100) )
use SALES
for i = 1 to 8
append blank
replace salesID with i
endfor
go 3
delete next 4
copy structure to NEWSales
use NEWSales
append blank
replace text with "Append: dBASE Plus ADD records from a source dBASE
table that are marked for deletion"
append from Sales for salesID <> 0
append blank
replace text with "Append OK"
append from Sales
append blank
replace text with "Append: dBASE Plus ADD records from a source dBASE
table that are marked for deletion"
append from Sales for true
goto top
browse
return
*******
Hope this helps,
BUZA Vasile
Under dBASE Plus, when APPEND have a FOR clause, records marked for
deletion from source table are added.
For example :
*******
/*
from the OLH....
for APPEND FROM...
If SET DELETED is OFF, dBASE Plus adds records from a source dBASE table
that are marked for deletion
and doesn't mark them for deletion in the current table.
If SET DELETED is ON, dBASE Plus doesn't add records from a source dBASE
table that are marked for deletion.
-------------------------------------------------------------------------
---------------------------------------------
*/
set safety off
SET DELETED ON
close tables
if file('SALES.DBF')
erase ('SALES.DBF')
endif
CREATE TABLE SALES ( SALESID SmallInt, text CHAR(100) )
use SALES
for i = 1 to 8
append blank
replace salesID with i
endfor
go 3
delete next 4
copy structure to NEWSales
use NEWSales
append blank
replace text with "Append: dBASE Plus ADD records from a source dBASE
table that are marked for deletion"
append from Sales for salesID <> 0
append blank
replace text with "Append OK"
append from Sales
append blank
replace text with "Append: dBASE Plus ADD records from a source dBASE
table that are marked for deletion"
append from Sales for true
goto top
browse
return
*******
Hope this helps,
BUZA Vasile