Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to recall a deleted record using a cursor adapter
Message
 
 
À
03/10/2005 15:29:35
Wen Guo
Financial Models Company
Mississauga, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01052393
Message ID:
01055705
Vues:
17
>>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform