Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Saving data instead of delete
Message
De
21/05/2008 20:23:56
 
 
À
21/05/2008 19:53:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01318588
Message ID:
01318931
Vues:
9
>If the table is never packed you can SET DELETED OFF before you run the report and SET DELETED ON afterwards.
>
>If the table gets packed you need to copy the deleted record to a history table
>
>scatter name oRecord MEMO FIELDS EXCEPT lot,location,location2
>insert into veg from name oRecord
>
>scatter name oRecord MEMO
>insert into history from name oRecord
>
>
>Bear in mind that when you eventually run the report you will have to select data from both the main and history tables
>SELECT * FROM maintable;
>   UNION ALL;
>SELECT * FROM history;
>ORDER BY ??????;
>INTO CURSOR curReportData
>
>I think the ORDER BY clause refers to the entire result set rather than just the second select. Somebody can correct me if I'm wrong.
>
>>I have this routine for moving data through this inventory program and it works great, however the customer would like to see 1 set or (Module) worth of reports that will work off cumulative numbers and print out averages of data therein. The problem with this is how the program was designed for data transfer.
>>
>>What I am trying to accomplish is this that the data still moves on to the next stage but that the data is also stored elsewhere for later reports or ??? below is the code for moving the data, maybe it can be stored in a view or ??? I have not done this before.
>>
>>Here's the code I am now working with
>>
>>
>>scatter name oRecord MEMO FIELDS EXCEPT lot,location,location2
>>insert into veg from name oRecord
>>delete
>>
>>
>>Anyone have any ideas???
>>
>>Thanks,
>>
>>Fred W.
Wow thanks then just 1 more stupid question this (will be existing) history.dbf will I have to design this with all the same fields etc... or do their NEED to be any additional fields???

Thanks A Lot

Fred W.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform