IDbDataParameter

IDbDataParameter

System.Data (system.data.dll) interface

This interface represents a parameter for a parameterized query or stored procedure Command . A provider implements this interface in a provider-specific parameter object, such as System.Data.SqlClient.SqlParameter . The properties include Precision (the maximum number of digits for numeric values), Scale (the maximum number of decimal places), and Size (the maximum size of the value, in bytes). Other properties are inherited from the IDataParameter interface, which this interface implements.

 public interface  IDbDataParameter  : IDataParameter {  // Public Instance Properties  public byte  Precision  {set; get; } 
   public byte  Scale  {set; get; } 
   public int  Size  {set; get; } 
} 

Implemented By

System.Data.OleDb.OleDbParameter , System.Data.OracleClient.OracleParameter , System.Data.SqlClient.SqlParameter

Returned By

IDbCommand.CreateParameter( )

IDbTransaction disposable

System.Data (system.data.dll) interface

This class encapsulates a relational database transaction. You can start a transaction, provided you have an open connection, by calling the IDbConnection.BeginTransaction( ) method, which returns an IDbTransaction instance. You can enlist commands in a transaction by setting their IDbCommand.Transaction property to the appropriate IDbTransaction object. You end the transaction by calling the Commit( ) method to complete the transaction and accept all changes, or the Rollback( ) method to cancel all changes. Different providers have different ways to support nested transactions. A relational database provider defines a provider-specific transaction object that implements IDbTransaction , such as System.Data.SqlClient.SqlTransaction .

One important fact is that the IDbTransaction class represents a data provider transaction; it's analogous to executing the BEGIN TRANSACTION SQL statement in SQL Server (or a similar statement in other data sources). It has nothing in common with COM+ services.

When creating a transaction, be sure that you understand the isolation level it uses, which determines how other users can interact with the same data. The default transaction level (set by the IsolationLevel property) is IsolationLevel.ReadCommitted , which means that shared locks are held while the data is being read to avoid dirty reads, but the data can be changed before the end of the transaction, resulting in nonrepeatable reads or phantom data.

 public interface  IDbTransaction  : IDisposable {  // Public Instance Properties  public IDbConnection  Connection  {get; } 
   public IsolationLevel  IsolationLevel  {get; }  // Public Instance Methods  public void  Commit  (  );  
   public void  Rollback  (  );  
} 

Implemented By

System.Data.OleDb.OleDbTransaction , System.Data.OracleClient.OracleTransaction , System.Data.SqlClient.SqlTransaction

Returned By

IDbCommand.Transaction , IDbConnection.BeginTransaction( )

Passed To

IDbCommand.Transaction

InRowChangingEventException serializable

System.Data (system.data.dll) class

This exception occurs only if you call the DataRow.EndEdit( ) method within the DataTable.RowChanging event handler. (The row is automatically placed into edit mode before the DataTable.RowChanging event is called, and the edit is committed at the end of the DataTable.RowChanging event.)

 public class  InRowChangingEventException  : DataException {  // Public Constructors  public  InRowChangingEventException  (  );  
   public  InRowChangingEventException  ( string   s   );  // Protected Constructors  protected  InRowChangingEventException  (System.Runtime.Serialization.SerializationInfo   info   ,
        System.Runtime.Serialization.StreamingContext   context   );
} 

Hierarchy

System.Object figs/u2192.gif System.Exception(System.Runtime.Serialization.ISerializable) figs/u2192.gif System.SystemException figs/u2192.gif DataException figs/u2192.gif InRowChangingEventException