Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Store Proc + Transaction + Errors + VP
Message
De
04/04/2005 04:21:11
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
01001066
Message ID:
01001149
Vues:
26
I serg, this is the errors message when i run it on Query Analyzer
my store proc1 sp_School_EnrollNewStudent called spUpdateTranJournalEntries in which both are wraped inside a transaction . maybe nested transaction because spUpdateTranJournalEntries is wraped by transaction and sp_School_EnrollNewStudent as well.
I want my app to recover despite errors on other store proc called. Still my ref. variable @hasError does not return correct values. using
ry 
lnError = 0
   SQLEXEC(oConn.nConnHandle,"EXEC proc1 ?@lnError")

  ** lnError must be .t. in case of any error
...
ROLLBACK at spUpdateTranJournalEntries
Server: Msg 6401, Level 16, State 1, Procedure spUpdateTranJournalEntries, Line 4555
Cannot roll back T_updateTranJournal. No transaction or savepoint of that name was found.
Server: Msg 266, Level 16, State 2, Procedure spUpdateTranJournalEntries, Line 65535
Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 1, current count = 2.
ERROR on spUpdateTranJournalEntries

COMMIT at spUpdateTranJournalEntries
Rollback on sp_School_EnrollNewStudent
thank you
Simplicio
Roses are #FF0000 Violets are #0000FF all my base are belong to you
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform