Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to clear out the contents of a View
Message
De
20/01/2005 11:16:23
 
 
À
20/01/2005 10:57:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00978872
Message ID:
00978907
Vues:
14
A thought:

I assume the view a simple one-table view, i.e. just a sub-set of the Products table. For your joinconditions, are you using the "where" clause or pukka left, right or full joins? I've found these to be an order of magnitude faster than "where" clauses.

Hey, Colin, I'm no expert on this subject but would like to help if I can.

>Sorry no...
>
>let me explain further.
>
>Underlying table of products
>ViewallProducts = a View of All Products - updateable
>
>i have a csv file of products which is to replace the existing table.
>
>i want to try to stick entirely with working with views for when i may upgrade the app to SQL Server or MSDE
>
>So i need to "zap" the products table and import the csv file into it. That i can do and it is straightforward.
>
>I have tried zapping the view and then tableupdate(.t.) but this does not work, the records in the underlying table are left unchanged - regardless of requery etc...
>
>
>I can Delete all on the view and tableupdate(.t.) this works but seems Very slow ( as i said 3-4 mins for 6.5K records ) - on a very fast pc
>
>deleting each record individually in the view and doing tableudpate(.t.) is even worse.
>
>what i guess i'm looking for is the quickest way of removing all the records in the underlying table but only working through the View.
>
>In the mean time i have set the import routine to work with the underlying tables instead of the views and for example the cleardown and import of products takes around 1- 2 seconds ( if that !)
>
>
>Hope this helps you help me, let me know if you want more info
>
>
>TIA
>
>Colin
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform