Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Requery on view with optimistic table buffering
Message
From
28/05/1999 20:50:13
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Requery on view with optimistic table buffering
Miscellaneous
Thread ID:
00224246
Message ID:
00224246
Views:
42
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
Map
View

Click here to load this message in the networking platform