Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transaction behavior
Message
De
07/12/2005 10:17:33
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01075467
Message ID:
01075721
Vues:
30
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform