use MyTable order "Some_Order"
if not seek(Seek_Value)
append blank
replace;
Field1 with Value1,;
Field2 with Value2, ...
endif
INSERT INTO is often recommended, instead of APPEND BLANK / REPALCE:
use MyTable order "Some_Order"
if not seek(Seek_Value)
insert into MyTable (Field1, Field2, ...);
values (Value1, Value2, ...)
endif
>if already exist records in table should not replace again.
>
>I am using these codes.
> SELECT ex
> SET ORDER TO all
> APPEND BLANK
> replace code WITH thisform.code.value
> replace descr WITH thisform.descr.value
> replace scode WITH thisform.scode.value
> replace lcode WITH thisform.lcode.value
> replace sec WITH thisform.sec.value
> replace cperc with tcperc
> replace cfail WITH fail
> REPLACE cpass WITH pass
> SELECT ex
> SET ORDER TO all
> Locate For code==thisform.code.value.and.thisform.descr.value.and.thisform.scode.value.and.thisform.lcode.value.and.thisform.sec.value
>
> replace code WITH thisform.code.value
> replace descr WITH thisform.descr.value
> replace scode WITH thisform.scode.value
> replace lcode WITH thisform.lcode.value
> replace sec WITH thisform.sec.value
> replace cperc with tcperc
> replace cfail WITH fail
> REPLACE cpass WITH passDifference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)