Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table locking problem
Message
De
18/08/2005 05:48:22
 
 
À
18/08/2005 04:10:57
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 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Divers
Thread ID:
01041851
Message ID:
01041872
Vues:
23
>Hi all,
>
>I have a program that is working on a sql server database via updateble views.
>Now i have a problem updating my view with the following code :
>(tablebuffering is set to 5)
>
>BEGIN TRANSACTION
>SELECT pos_s_invoice
>replace status WITH 5,doc_no WITH m.nCurrentFacId
>IF NOT TABLEUPDATE(2,.T.,'pos_s_invoice')
> ROLLBACK
> RETURN .F.
>ELSE
> MESSAGEBOX('updated')
> END TRANSACTION
>ENDIF
>
>Afther the 'end transaction' my table is still locked. Does anybody know why ?
>
>thnx

The transactions of VFP don't check the transactions of SQL server.
BEGIN TRANSACTION
SELECT pos_s_invoice
* next open a SQL trans session
replace status WITH 5,doc_no WITH m.nCurrentFacId

IF NOT TABLEUPDATE(2,.T.,'pos_s_invoice')
  =SQLROLLBACK(CURSORGETPROP("ConnectHandle")
  ROLLBACK
  RETURN .F.
ENDIF
 =SQLCOMMIT(CURSORGETPROP("ConnectHandle")
 END TRANSACTION
 MESSAGEBOX('updated')
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform