General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Transaction's behavior
1 / CONFIGURATION
Personal computer "PC1" WITH DRIVE C:\
Personal computer "PC2" WITH DRIVE C:\
ON "PC2" , I MAP "PC1\C:\" with letter P:\
ON PC1 drive C , I have a database , called "mydbc" ;
In "mydbc" , I have a table, called "mytable" ;
In "mytable" , I have at least one field, called "myfield" ;
In "mydbc", I also have a view, called "myview" , build on "mytable" .
2 / CODE THAT GIVES PROBLEM
2a / FIRST PART
On "PC1" , Nancy executes following code
10 OPEN DATA C:\mydbc.dbc
20 USE myview && view in row buffering
30 REQUERY() && all records are extracted
40 REPLACE myfield WITH "news1" && first record
50 BEGIN TRANSACTION
60 TABLEUPDATE(0,.F.)
70 SUSPEND
80 END TRANSACTION
90 CLOSE ALL
Thanks line 70 , Nancy has time to go on PC2
She executes following code
10 OPEN DATA P:\mydbc.dbc
20 USE mytable
30 BROWSE
She tries to change data on the first record of mytable
She can not ; First record is locked ;
If she tries to change data on any other record, she gets following message
"Record not available … Please wait …"
She goes back on PC1, executes command <> and comes back on PC2
She notices that message has disappeard
2b / SECOND PART
Nancy executes then all the code here above a second time with
another view build on another table
But with this second table, she gets no more the message
"Record not available … Please wait …"
3 / MY QUESTION
In first part, everything looks like mytable was during the transaction in FILE LOCKING
In second part, everything looks like the table was during the transaction in RECORD LOCKING
Which parameter can change the behavior of visual foxpro ?????
(An update trigger ,….??? )
Did someone already meet the same thing ???
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