visual foxpro - VFP. Deleted records – indexing - re-creation of records -


i have table of sales order lines (sdetail); there index on records candidate index key of order reference plus str( line number). used retrieving lines of particular order.

there primary index on sdetail table sequential id.

the order may amended. if order line deleted user mark record deleted in table; when processing run set deleted on, user not see these deleted records.

if re-creates line, liable create error ‘uniqueness of index violated’ understand that. avoid creating error, can see 2 possible approaches :

either : include filter expression on index ‘for !deleted()’ these records invisible @ run time

or : when wish test existence of record particular line, set deleted off, test existence of record, , recall if necessary. revert set deleted on.

what other developers do? or there better way?

thank you

there isn't 1 rule carved in stone. recalling 1 of ways use (i seldom need recall). don't !deleted() type indexes (if use create bitmap index).

a third option not make such index "candidate". said, lineno's sole purpose ordering shouldn't candidate index.


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -