General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Requery on view with optimistic table buffering
I’m using a local view with buffer mode override = 5 (optimistic table buffering). This view contains a dummy field “Product” like this:
SELECT Catalogo.catnombre, Catalogo.catiid, Catalogo.orden,;
Catalogo.catiidmaquina, SPACE(10) AS product;
FROM prueba1!catalogo;
WHERE Catalogo.catiidmaquina = ?vp_iIDMaquina
Every time it is requeried, I Scan through the table to asign some values to the product fiels (just for showing purposes). Immediately after assigning this new value, I set the field state to 1 in order to have the view as if it was never modified
Scan
Replace product with
setfldstate("product", 1)
endscan
Now, if I requery the view I get a message saying that the cursor contains not updated changes even when getfldstate(-1) returns 111111.
I’m going around this by issuing TableRevert(.t.) just before the requery() which seems to me not the best way to do it, I mean, there should be another property or state to set so I can requery() without the TableRevert().
Any tips?
Regards
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only