Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transaction cause program hang
Message
De
05/08/2007 11:27:40
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Transaction cause program hang
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01246020
Message ID:
01246020
Vues:
61
Hi,
I have code as below. It cause program hang when update 2nd record at TABLEUPDATE() line.
		CURSORSETPROP("Buffering", 5, "Items")
		CURSORSETPROP("Buffering", 5, "Books")

		lnConn = CURSORGETPROP("ConnectHandle", "Items")
		lnCommitted = 0
		lnUnCommitted = 0
		  
		SQLSETPROP(lnConn,"Transactions", 2)

		SELECT join_c
		SCAN
			SCATTER NAME loRecord MEMO
			
			SELECT Items
			APPEND BLANK
			GATHER NAME loRecord MEMO
			
			SELECT Books
			APPEND BLANK
			GATHER NAME loRecord MEMO
				
			IF TABLEUPDATE(.T., .F., "Items") AND TABLEUPDATE(.T., .F., "Books")
				SQLCOMMIT(lnConn)
				SELECT join_c
				RAISEEVENT(THIS, "UpdateStatus", "Item code: " + ItemCode + " Item Name:" + ItemName + " is updated.")
				lnCommitted = lnCommitted + 1  
			ELSE
				AERROR(laError)
				TABLEREVERT(.T., "Items")
				TABLEREVERT(.T., "Books")
				
				SQLROLLBACK(lnConn)

				SELECT join_c
				RAISEEVENT(THIS, "UpdateStatus", "Error: " + laError[3] + ;
												 " Item code: " + ItemCode + ;
												 " Item Name: " + ItemName)
				lnUnCommitted = lnUnCommitted + 1 
			ENDIF
		ENDSCAN
Any ideas?
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Répondre
Fil
Voir

Click here to load this message in the networking platform