>>>Hi Everybody,
>>>
>>>We have an existing application which directly accesses VFP data from the user interface. I am trying to separate the data from the interface by using cursoradapters. While doing so, I have come across a problem when I try to recall a deleted record. When a deleted record is retrieved from a cursor adapter, it appears to be a regular record. Deleted() returns FALSE for the record. And there is no way that I can recall it.
>>>
>>>Any suggestions?
>>
>>To know the deleted status of a record using a CursorAdapter (i.e., SQL), you have to add a field to your list of selected fields:
>>
>>Select MyTable.*, deleted() as IsDeleted from MyTable where ...
>>
>>IsDeleted is just a field alias. You can alias that field to whatever you want.
>Thanks a lot, Mark. But how can you recall a deleted record?
AFIAK, you can not do this directly with the CA. You have to find the record in the actual table and issue the RECALL command. The CA relies on SQL to SELECT, INSERT, UPDATE and DELETE records. There is no SQL command that would directly undelete a record. Indirectly, you could compose a SQL command that calls a procedure or function that would do undelete for you.
Mark McCasland
Midlothian, TX USA