Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create cursor in a particular work area
Message
 
 
To
04/11/2004 08:41:16
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00957814
Message ID:
00958666
Views:
18
Hi Fabio!

I SELECT(0) to create the first cursor and SELECT(1) to pick the WA to move it to so it's HIGHLY unlikely I would ever encounter this problem but thanks for pointing out a potential Gotcha!



>>>
ATTENTION, if the cursor it is created into the particular WA,
this code fails !

CLOSE TABLES ALL
CREATE CURSOR W1 (A i)
CREATE CURSOR W2 (A i)
SELECT 0
? 'WHERE THE CURSOR IT IS CREATED',SELECT()
CREATE CURSOR crs_at3_temp (fname c(1))
USE DBF("crs_at3_temp") AGAIN IN 3 ALIAS crs_at3
USE
? SELECT("crs_at3")
USE IN 3
solution:

#DEFINE PARTICULARWA 3
SELECT 0
CREATE CURSOR 'crs_at3'+IIF(SELECT()=PARTICULARWA,'','_') (fname c(1))
IF SELECT()#PARTICULARWA
USE DBF() AGAIN IN PARTICULARWA ALIAS crs_at3
USE
ENDIF
>>>
Kevin Scott
kehvn@carolina.rr.com


Hey! It's not my fault. It's some General named Protection!
Previous
Reply
Map
View

Click here to load this message in the networking platform