Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transaction behavior
Message
From
07/12/2005 10:17:33
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01075467
Message ID:
01075721
Views:
28
This message has been marked as the solution to the initial question of the thread.
Hi,

>>Maybe the "File is in use" error has the same cause?
>>Regards,
>>Viv
>
>That's what I suspect, but the Help then is misleading. Not only the updated records become unavailable, but the whole table is locked. Could you please reproduce it?
>
>If this is the case, we need to make sure to do imports only when no one is using the system.

A second instance of the following form fails to execute the "USE table1" line if the transaction is open in the first instance. Error message is "File is in use by another user"
DEFINE CLASS form1 AS form


	DoCreate = .T.
	Caption = "Form1"
	WindowType = 1
	Name = "Form1"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 36, ;
		Left = 72, ;
		Height = 25, ;
		Width = 61, ;
		Caption = "Command1", ;
		Name = "Command1"


	PROCEDURE Load
		SET EXCLUSIVE OFF
		SET MULTILOCKS ON
	ENDPROC


	PROCEDURE command1.Click
		USE Table1
		=CURSORSETPROP("Buffering",5)
		APPEND BLANK
		REPLACE Table1.anyfield WITH "Hello"
		BEGIN TRANSACTION
		  =TABLEUPDATE(.T.,.T.)
		  WAIT WINDOW "Holding Transaction Open"
		END TRANSACTION 
	ENDPROC
ENDDEFINE
Do you really need to perform so many operations within the transaction ?

Regards,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform