Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update remote view & table buffering
Message
From
13/12/2000 11:06:36
 
 
To
13/12/2000 04:26:12
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00452773
Message ID:
00452862
Views:
18
Hi!

Before line
? CURSORSETPROP("Sendupdates", .T.)

You require to make other settings for view required to make it updatable. At least you need to set up Key Field for view.

I don't think that updating works slow using 5-th buffering mode. It might work slow with views - I agree. If you use indexing of view - it always work slower, because when tableupdate works, it scans all records in table using current index order, not a physical order.


>
>CREATE SQL VIEW VIEW1 REMOTE CONNECTION Connect1 AS SELECT * FROM TEST
>INDEX ON ALLTRIM(Field1)+ALLTRIM(Field2) TAG key1 ADDITIVE
>? CURSORSETPROP("Buffering", 5)
>? CURSORSETPROP("Sendupdates", .T.)
>FOR i=1 TO 5
>	m.Field1="A"+ALLTRIM(STR(i))
>	m.Field2="B"+ALLTRIM(STR(i))
>	m.sumvalue=i
>	IF NOT SEEK(m.Field1+m.Field2,"View1","Key1")
>		INSERT INTO View1 FROM MEMVAR
>	ELSE 	
>		REPLACE View1.SumValue WITH View1.SumValue+1
>	ENDIF
>ENDFOR
>? TABLEUPDATE(2,.T.)
>
>
>While something like this works with row buffering and a TABLEUPDATE() right after the Insert or Replace, an ODBC error about not being able to insert empty rows in a views base table occurs with buffering=5.
>
>Turning the thing around and issuing the CURSORSETPROP("Sendupdates", .T.)
>after the tableupdate results in an invalid connection handle error.
>
>With row buffering against a SQL Server 7.0 it´s just so slow, so I´d really like to do my local calculations on the view and then update the whole thing in one go.
>
>How to do it, that´s the question?
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform