Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Zap/Dele All - no packing
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01632301
Message ID:
01632324
Views:
61
ZAP is for sure a lot faster - but he's not able to get exclusive use of the table for some reason - so until he gets around that he's kinda stuck.

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
ICQ 10556 (ya), 254117
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform