Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GETFLDSTATE() problem in SELECT
Message
From
14/06/2004 07:00:09
 
 
To
14/06/2004 00:13:56
Suhas Hegde
Dental Surgeon
Sirsi, India
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Miscellaneous
Thread ID:
00913252
Message ID:
00913362
Views:
22

Hi Fabio,

I still dont think it solves the problem.

consider this..

clear
close all
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 RECORD 2 abc WITH 'xyz4'

?"updating Abcd : " + Icase(tableupdate(2,.t.,"abcd"),"Updated","not updated")

insert into abcd values('xyz5')
replace abc with "xyz5 + R" for abc = 'xyz5'
?"Replacing after insert"

select * from abcd with (buffering = .t.) WHERE "2" $ GETFLDSTATE(-1)+LEFT(abc,0)
?_tally,"records returned . expected 1"
select * from abcd with (buffering = .t.)
?_tally,"records returned -- total number in buffered alias"
select * from abcd
?_tally,"records returned -- total number from disk"

Any ideas

Suhas


This is simple also.
CLEAR
CLOSE DATABASES ALL
CLOSE TABLES all
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 RECORD 2 abc WITH 'xyz4'

?"updating Abcd : " + Icase(tableupdate(2,.t.,"abcd"),"Updated","not updated")

insert into abcd values('xyz5')

replace abc with "xyz5 + R"

?"Replacing after insert"
? GETFLDSTATE(-1) && added updated records GETFLDSTATE use 3 and 4 like flag

select * from abcd with (buffering = .t.) WHERE "2" $ GETFLDSTATE(-1)+LEFT(abc,0) OR "4" $ GETFLDSTATE(-1)+LEFT(abc,0)

?_tally,"records returned . expected 1"

select * from abcd with (buffering = .t.)
?_tally,"records returned -- expected 5"
select * from abcd
?_tally,"records returned -- expected 4"
Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform