Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ISEXCLUSIVE() Problem
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00171657
Message ID:
00171703
Views:
25
>I have a problem using the ISEXCLUSIVE( ) function. Here's a simple example of what happens. I use a table exclusive. Next I execute a SQL Select statement using the same table. If I them issue the isexclusive() function using the table name it returns .T.. Now if I display Stat the table is open twice, the second instance is readonly. If I try to pack the table I get the error message "File is open in another work area". Am I going about this the wrong way using the isexclusive() function? How can I tell when it's safe to pack the table?
>
>*Example Code from the command line
>
>Use test_table exclusive
>
>Select * from test_table
>
>display stat && (You can see the table is open twice)
>
>? isexclusive("test_table") &&( Returns a .T. showing the table is open exclusive)
>
>pack && (Get the File open in another work area error.)
>
>? "HELP"
>
Hi Brad,

What's happening is that the cursor produced by your SQL statement is actually just the same table opened with a USE AGAIN. There are two possible workarounds. One is to close the cursor (USE IN...), the other is to use the NOFILTER clause in your query.

hth,
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform