Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GETFLDSTATE() problem in SELECT
Message
From
14/06/2004 06:43:35
 
 
To
14/06/2004 01:36:43
Suhas Hegde
Dental Surgeon
Sirsi, India
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Miscellaneous
Thread ID:
00913252
Message ID:
00913358
Views:
14

Close all
Create Cursor abcd (abc C(10))
insert into abcd values('xyz')
insert into abcd values('xyz1')
cursorsetprop("buffering",5)
insert into abcd values('xyz2')
insert into abcd values('xyz3')
replace abc WITH 'xyz4' FOR abc='xyz1'
Select 0
select * from abcd with (buffering = .t.) WHERE "2" $ GETFLDSTATE(-1)+LEFT(abc,0) into cursor query
Use in query
select * from abcd with (buffering = .t.) WHERE "2" $ GETFLDSTATE(-1)+LEFT(abc,0) into cursor query && error "alias not found "

Any ideas

suhas


this is simple,
the rule for empty workarea is valid only if it is THE FIRST EMPTY WORKAREA.
then at WHERE PARSING phase it use the empty workarea,
and GETFLDSTATE() fire this error for a empty WA.
CLEAR
CLOSE DATABASES ALL
CLOSE TABLES all
ON ERROR ? MESSAGE()
SET MULTILOCKS ON
Create Cursor abcd (abc C(10))
insert into abcd values('xyz')
insert into abcd values('xyz1')
cursorsetprop("buffering",5)
insert into abcd values('xyz2')
insert into abcd values('xyz3')
replace abc WITH 'xyz4' FOR abc='xyz1'
Select 0
select * from abcd with (buffering = .t.) WHERE "2" $ GETFLDSTATE(-1) into cursor query
USE
Select 100 && not first empty WA fire the error
? SELECT(0),"is empty",ALIAS()
select * from abcd with (buffering = .t.) WHERE "2" $ GETFLDSTATE(-1) into cursor query 
Select 2   && this not fire the error
? SELECT(0),"is empty",ALIAS()
select * from abcd with (buffering = .t.) WHERE "2" $ GETFLDSTATE(-1) into cursor query
ON ERROR 
Previous
Reply
Map
View

Click here to load this message in the networking platform