DbParameter DbParameter DbParameter DbParameter Class


Represents a parameter to a DbCommand and optionally, its mapping to a DataSet column. For more information on parameters, see Configuring Parameters and Parameter Data Types.

public ref class DbParameter abstract : MarshalByRefObject, System::Data::IDbDataParameter
public abstract class DbParameter : MarshalByRefObject, System.Data.IDbDataParameter
type DbParameter = class
    inherit MarshalByRefObject
    interface IDbDataParameter
    interface IDataParameter
Public MustInherit Class DbParameter
Inherits MarshalByRefObject
Implements IDbDataParameter


DbParameter() DbParameter() DbParameter() DbParameter()

Initializes a new instance of the DbParameter class.


DbType DbType DbType DbType

Gets or sets the DbType of the parameter.

Direction Direction Direction Direction

Gets or sets a value that indicates whether the parameter is input-only, output-only, bidirectional, or a stored procedure return value parameter.

IsNullable IsNullable IsNullable IsNullable

Gets or sets a value that indicates whether the parameter accepts null values.

ParameterName ParameterName ParameterName ParameterName

Gets or sets the name of the DbParameter.

Precision Precision Precision Precision

Gets or sets the maximum number of digits used to represent the Value property.

Scale Scale Scale Scale

Gets or sets the number of decimal places to which Value is resolved.

Size Size Size Size

Gets or sets the maximum size, in bytes, of the data within the column.

SourceColumn SourceColumn SourceColumn SourceColumn

Gets or sets the name of the source column mapped to the DataSet and used for loading or returning the Value.

SourceColumnNullMapping SourceColumnNullMapping SourceColumnNullMapping SourceColumnNullMapping

Sets or gets a value which indicates whether the source column is nullable. This allows DbCommandBuilder to correctly generate Update statements for nullable columns.

SourceVersion SourceVersion SourceVersion SourceVersion

Gets or sets the DataRowVersion to use when you load Value.

Value Value Value Value

Gets or sets the value of the parameter.


CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Inherited from MarshalByRefObject)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetLifetimeService() GetLifetimeService() GetLifetimeService() GetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.

(Inherited from MarshalByRefObject)
ResetDbType() ResetDbType() ResetDbType() ResetDbType()

Resets the DbType property to its original settings.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

IDataParameter.SourceVersion IDataParameter.SourceVersion IDataParameter.SourceVersion IDataParameter.SourceVersion
IDbDataParameter.Precision IDbDataParameter.Precision IDbDataParameter.Precision IDbDataParameter.Precision

Indicates the precision of numeric parameters.

IDbDataParameter.Scale IDbDataParameter.Scale IDbDataParameter.Scale IDbDataParameter.Scale

For a description of this member, see Scale.

Applies to

See also