Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete All Rows vs Delete Entire File?
Message
De
27/09/2001 15:42:14
Peter Brama
West Pointe Enterprises
Detroit, Michigan, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00561614
Message ID:
00561633
Vues:
29
I thought about using a cursor but was worried about the ability to add a new text field and enter changes on the fields I need to change for this session. That too with assigning it to a grid... grids and me never seem to get along too well.



>See faq#8019 to how resolve a problem with your grid.
>Can you use a cursor instead of a table if you're going to delete it antway? ZAP command would remove all records from it or table.
>
>>I have a label program I am writing that has a routine that uses a SELECT SQL to build a new table to be used for a grid. In this table, a couple fields can be editable and changed for this one session as well as a new field being added for input. This table has 6 fields out of a possible 60 from the source file.
>>
>>Before the select, if the table FILE() exists, I delete that and the associated CDX file. The SQL creates that table again and an INDEX ON creates the indexs I need for this "session"
>>
>>I originally was going to just mark all the rows for DELETE and add to the table with the SQL but I am worried about table physical disk space size for this could be run several times per day. I know I can PACK a table but thought just deleting it would work just the same.
>>
>>The problem I am experiencing now is most likely due to remove/add the table. I have a grid on a form that is driven by the table. I have a button that lets the user select a new file with the intention that the grid would be reloaded with the new data. The routine calls the above steps and the grid turns to an empty white box with no rows, columns or headers. Exiting out and checking the table, the NEW data that was selected is loaded properly.
>>
>>Any suggestions on how to handle this. Keep in mind, I need to be able to edit field data, select data, add a new field to this table (it is a small fraction of the number of fields from the source file) for input use.
Peter Brama
West Pointe Enterprises

VFP is getting easier but STILL alot to learn!!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform