Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete All Rows vs Delete Entire File?
Message
From
27/09/2001 15:42:14
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00561614
Message ID:
00561633
Views:
28
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!!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform