Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select command and Tables.
Message
From
11/01/2004 08:20:07
 
 
To
11/01/2004 02:25:15
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00865804
Message ID:
00865814
Views:
14
SELECT - SQL only reads data committed to disk. However you can use xBASE commands to read uncommitted data as shown in the following example:
SET MULTILOCKS ON
CREATE TABLE temp ( group c(1), value I )
INDEX ON group TAG group

INSERT INTO temp (group, value ) VALUES ('A', 1)
INSERT INTO temp (group, value ) VALUES ('A', 2)
INSERT INTO temp (group, value ) VALUES ('B', 1)
INSERT INTO temp (group, value ) VALUES ('B', 2)
SELECT group, sum(value) FROM temp GROUP BY group INTO CURSOR c_1

CURSORSETPROP("Buffering" ,5, 'temp')
INSERT INTO temp (group, value) VALUES('C', 1)
INSERT INTO temp (group, value) VALUES('C', 2)
SELECT group, sum(value) FROM temp GROUP BY group INTO CURSOR c_2  && no 'C' group here

CREATE CURSOR c_3 (group c(1), value i)
SELECT temp
LOCATE && go top
DO WHILE NOT EOF()
	m.group = group
	SUM value TO value WHILE group == m.group
	INSERT INTO c_3 FROM MEMVAR
ENDDO
SELECT c_3 && this one has all the groups
>Hi U.T. members!!
>
>I am using VFP7.0!
>
>In a FORM where all the tables are added with Optimistic Table Buffering;
>
>Whenever I issue a Select-SQL command, it takes data from table from the server hard-drive.
>
>Is there a way to fetch data from Cursor (table in the dataenvironment) and not from table stored on HDD.
>
>I do not want to issue TableUpdate on this table.
>
>Awaiting reply!!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform