Hi there, I'm not too sure about some of the terminology but will try to explain my situation. I'm using a SQL 2000 back end and use SQLEXEC to get data into VFP where it is bound to various controls. This works fine throughout my program.
In one module, I allow users to add multiple records to a cursor. They can then decide whether to save or discard the new records. If they decide to SAVE then the new records are added to the backend, again using SQLEXEC. The problem is that I also want them to be able to remove records locally and then choose to either commit or discard these changes in the same way. So the CLICK event of the Remove button says:
Which marks the record for deletion but doesn't actually get rid of it. I know that PACK would normally clear out such records, but when I try that it says: "Function is not supported on remote tables" - I'm guessing this is related to the fact that my data is coming from SQL using SPT? I have
which means the deleted records are hidden, but RECCOUNT() still 'sees' them which is a real pain. For example, I have code that checks number of records - if > 1 then a dropdown is made visible, if = 1 then user sees only a label. Also, in the save routine my code loops through all the records in the cursor - do I have to put a clause to exclude deleted records in all such instances? Or is there a way of properly getting rid of these records?
In one module, I allow users to add multiple records to a cursor. They can then decide whether to save or discard the new records. If they decide to SAVE then the new records are added to the backend, again using SQLEXEC. The problem is that I also want them to be able to remove records locally and then choose to either commit or discard these changes in the same way. So the CLICK event of the Remove button says:
Code:
DELETE FROM myCursor WHERE pk = myPK
Code:
SET DELETED ON