Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update remote view & table buffering
Message
De
13/12/2000 04:26:12
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Update remote view & table buffering
Divers
Thread ID:
00452773
Message ID:
00452773
Vues:
63
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?
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform