SqlTransaction: Why is TableAdapter in generated dataSet.Designer.cs protected

In order to set the Transaction for a SqlCommand I have to get to the SqlCommand - Right

But I have not found a way to unprotect the Adapter inside the generated class...

Any ideas - workarounds

or "Am I evil " ;-)

Thanks
Peter


Answer this question

SqlTransaction: Why is TableAdapter in generated dataSet.Designer.cs protected

  • John Clark

    I have the same problem, I find this code but I don't know if this is the best way.

    Using transaccion As New Transactions.TransactionScope

    'Put your code here

    transaccion.Complete()

    End Using


  • Nathan Liebke

    You both should be using SQL Server stored procedures and using transactions there...not in your page code.

    Your approach is opening yourself widely for hacks and exceptions.

    Adamus



  • SqlTransaction: Why is TableAdapter in generated dataSet.Designer.cs protected