Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Transactions Using ADO
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
01296816
Message ID:
01296837
Vues:
12
>I am trying to write some code utilizing an SQL Transaction in order to be able to RollBack in case any portion of the data manipulation being performed fails. Unfortunatly I am getting the following error:
>
>System.InvalidOperationException: ExecuteScalar requires the command to have a transaction when the connection assigned
>to the command is in a pending local transaction.  The Transaction property of the command has not been initialized.
>
>I have checked online and have found a few references to this error, but the so-called solutions to them, are apparently what I have in my code already. So I am really at a loss. This error specifically happens when I call the DataTable.Update() method to push data changes back up to the SQL Server.

Didn't think there was a DataTable.Update(). Do you mean TableAdapter (or DataAdapter). You probably need to post some code anyway..
Best,
Viv
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform