Using VFP 7.0 with CDX and a database container.
The database is sitting on a remote server on the network and the DBF is 100MB and the CDX is 100MB.
I want to delete a record, however there is a 50/50 chance that the record I want to delete does not exist. I have come up with a few ideas and I am looking for what might be the quickest solution.
Tablename: alertdvcfail
Index Tag: sd1_id
Index Expression: ALLTRIM(sd1_id)
Option #1
Option #2
What do you think ?
ToddWW
The database is sitting on a remote server on the network and the DBF is 100MB and the CDX is 100MB.
I want to delete a record, however there is a 50/50 chance that the record I want to delete does not exist. I have come up with a few ideas and I am looking for what might be the quickest solution.
Tablename: alertdvcfail
Index Tag: sd1_id
Index Expression: ALLTRIM(sd1_id)
Option #1
Code:
OPEN DATABASE databasename
DELETE FROM alertdvcfail WHERE ALLTRIM(sd1_id) == 'somedata'
Option #2
Code:
USE alertdvcfail ORDER sd1_id SHARED
IF SEEK('somedata')
DELETE
ENDIF
What do you think ?
ToddWW