>thanks for your helpful reply,
>If a seek value is more one how it will be use
>may be or other way but i am gating error.
>if not seek(code,descr,scode,lcode,sec)
>my problem is this code, descr, and scode, are same value or name. but only diffirent lcode, and sec.
>When i replace a records, replace same record with same value, I want only one records in may table.
>thanks
I was thinking about SEEK or SEEK() for quick searches on the primary key, or other key. For example, if a product with a certain code already exists.
If you want to check if the combination of more than one value already exists, you have two options:
1) Create an index on the combined expression. For example, create an index on
code + descr, and then
seek (varCode + varDescr), where varCode and varDescr are variables.
2) Use LOCATE, for example:
LOCATE FOR Code = varCode AND Descr = varDescr. It is probably beneficial, for speed, to have indexes on some of the fields, but you don't select the indexes explicitly.
Difference 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)