Assembly: System.Data (in System.Data.dll)
The property was changed while a transaction was in progress.
If you set while a transaction is in progress and the Transaction property is not null, an InvalidOperationException is generated. If the Transaction property is not null and the transaction has already been committed or rolled back, Transaction is set to null.
The following example creates an OleDbCommand and sets some of its properties.
Public Sub CreateOleDbCommand() Dim queryString As String = _ "SELECT * FROM Categories ORDER BY CategoryID" Dim command As New OleDbCommand(queryString) command.Connection = New OleDbConnection _ ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=NWIND_RW.MDB") command.CommandTimeout = 20 End Sub
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.