Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index and transaction
Message
From
13/07/1998 04:17:20
 
 
To
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Index and transaction
Miscellaneous
Thread ID:
00116702
Message ID:
00116702
Views:
60
Hi , Nancy!

I want to continue conversation the begun month back about Transactions. As has received the answer, but could not in time answer (has left in holiday). I wrote, that is possible to set conditions which with a Transaction correctly will not work with indexes.

Necessary conditions:
>There is the form 1, in which table A with a flag only on reading opens.
>There is the form 2, in which table A with 5 bufferization opens.

The form 2 should be started AFTER the form 1.

>Further, I add record in the table À.. Then, inside transaction in the form 2, I update the table À. I close transaction.

Example of a code in the form 2
sele table_A
set order to key_A
insert into table_A (key) values (new_key)
begin transaction
=tableupdate(.t.,.t.,'table_A')
end transaction
seek new_key
'Records not found'

>In the table the record occurs. In an index file (CDX) only after command REINDEX.
>In all forms is established private date session, modeless.
>
>If in the form 1 to clear a flag of the table A - only on reading, or to start the forms in the other order - all normally.

Nansy wrote:

>>What do mean by the "index does not update." How do you know? Is it >>because the new record isn't shown in form1? In that case, when you >>activate Form1, you might need to refresh it...

Most sad, Nancy, that Refresh of the forms with anything, problem not in updating object. It is possible to close both forms. The index actually falls. In an index file there are no references on record added by such way in the form 2. It can be seen in View or usual Browse (the index is established - records it is not visible, the index is switched - off - here they!).

Try to create such conditions. Check up me. I wish successes.
Next
Reply
Map
View

Click here to load this message in the networking platform