Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Zap/Dele All - no packing
Message
De
29/02/2016 23:57:14
 
 
À
29/02/2016 20:52:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01632301
Message ID:
01632322
Vues:
63
How about:
SET SAFETY OFF
SET EXCLUSIVE on

USE bookings IN 0 EXCLUSIVE &&I have tried it with and without the exclusive clause. Makes no difference.
* USE ... IN 0 is good practice but be aware the table may not be opened in the current work area
* unless there is no table open in it already
* In fact, even if the current work area is empty, if there is a lower-numbered one also empty
* it will be used instead
* After a USE .. IN 0 command, either:
* Follow it with SELECT Bookings, or
* Use the IN clauses in commands to make sure you're working with the correct alias (e.g. ZAP IN Bookings below)

IF ISEXCLUSIVE( "Bookings" )
  ZAP IN Bookings
  * DELETE ALL
  * PACK

ELSE
  MESSAGEBOX('Not opened exclusively')

ENDIF

SET EXCLUSIVE OFF
SET SAFETY ON
As Help says, "Issuing ZAP is equivalent to issuing DELETE ALL followed by PACK, but ZAP is much faster."

If the above doesn't help:

- Is Bookings a table, a cursor, or a view?
- PACK creates temporary files, so you need read/write privileges to your temp files folder ( SYS( 2023 ) ).
- If you're running real-time antivirus scanning, you could try temporarily disabling it, or excluding the folders containing Bookings.* and your temp files
- Where are the Bookings.* files stored? Some low-end NAS boxes don't fully or properly support NetBIOS locking mechanisms so you can get unexpected results with EXCLUSIVE use and other commands that rely on it
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform