Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
#108
Message
From
28/02/1999 22:48:50
 
 
To
28/02/1999 21:41:03
Raymond Humphrys
Michigan Department of Community Health
Bath, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Re: #108
Miscellaneous
Thread ID:
00192502
Message ID:
00192525
Views:
26
>What about cursors? If created in a Private Datasession can they be deleted with out stepping on someones elses toes. I've looked everywhere and can't find an "EXCLUSIVE" anywhere.
>

ordinarily, you erase a cursor by simply closing it; it goes away by itself. You might be hurting yourself if you create one with a SQL Select and then use the trick of opening it again using the .DBF reference, something like:

SELECT * FROM SomeFile INTO CURSOR Bletch WHERE Foo = "BAR"
USE (DBF()) AGAIN IN 0 ALIAS Mumble

Regardless of order, once all references to the table backing the cursor Bletch go away, the temporary table goes away. If the file still exists and you still have it used somewhere, when you try to erase it you'll get the error 108. If you do something like save the name via DBF(), and try to erase it after the fact, you'll get a 'file not found' error of some sort.

It should be fairly obvious that you can't rename a file while something has it open. Since the USE (DBF()) AGAIN trick works, the SQL Select probably doesn't have it opened exclusively; I haven't tested it other than at the command line, so I can't be sure of the behavior within a program in a private data session


>thanks
>>>What are some of the conditions that would give rise to error #108?
>>>
>>>I've opened all Network files with Exclusive set off,Shared, and in Private datasessions. I still seem to randomly get this error. It also only happens on ONE network; one with a lot of activity, users and printer activity. The file server is only a 166 with 64 mb of ram. It never happens on two other networks htat have very little activity.
>>>
>>
>>It would help to know what statement was being executed when this occurred. The most obvious causes would be attempts to delete or rename a file that another user, or even the same user, had open in any form - you can't delete or rename something that someone else has open. The other frequent cause is either an attempt to USE a file that someone either has opened exclusively, or has a low-level file open on in DENY ALL mode, or an attempt to USE EXCLUSIVE a file that someone has opened even in a read-only mode.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform