DbParameter Class

Represents a parameter to a DbCommand1 and optionally, its mapping to a DataSet2 column. For more information on parameters, see Configuring Parameters and Parameter Data Types (ADO.NET)3.

Namespace:  System.Data.Common11
Assembly:  System.Data (in System.Data.dll)
C#
public abstract class DbParameter : MarshalByRefObject, 
	IDbDataParameter, IDataParameter

The DbParameter type exposes the following members.

  Name Description
Protected method Supported by the XNA Framework DbParameter12 Initializes a new instance of the DbParameter class.
Top
  Name Description
Public property Supported by the XNA Framework DbType13 Gets or sets the DbType14 of the parameter.
Public property Supported by the XNA Framework Direction15 Gets or sets a value that indicates whether the parameter is input-only, output-only, bidirectional, or a stored procedure return value parameter.
Public property Supported by the XNA Framework IsNullable16 Gets or sets a value that indicates whether the parameter accepts null values.
Public property Supported by the XNA Framework ParameterName17 Gets or sets the name of the DbParameter.
Public property Supported by the XNA Framework Size18 Gets or sets the maximum size, in bytes, of the data within the column.
Public property Supported by the XNA Framework SourceColumn19 Gets or sets the name of the source column mapped to the DataSet2 and used for loading or returning the Value20.
Public property Supported by the XNA Framework SourceColumnNullMapping21 Sets or gets a value which indicates whether the source column is nullable. This allows DbCommandBuilder22 to correctly generate Update statements for nullable columns.
Public property Supported by the XNA Framework SourceVersion23 Gets or sets the DataRowVersion24 to use when you load Value20.
Public property Supported by the XNA Framework Value20 Gets or sets the value of the parameter.
Top
  Name Description
Public method CreateObjRef25 Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject5.)
Public method Supported by the XNA Framework Equals(Object)26 Determines whether the specified Object4 is equal to the current Object4. (Inherited from Object4.)
Protected method Supported by the XNA Framework Finalize27 Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object4.)
Public method Supported by the XNA Framework GetHashCode28 Serves as a hash function for a particular type. (Inherited from Object4.)
Public method GetLifetimeService29 Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject5.)
Public method Supported by the XNA Framework GetType30 Gets the Type31 of the current instance. (Inherited from Object4.)
Public method InitializeLifetimeService32 Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject5.)
Protected method Supported by the XNA Framework MemberwiseClone()33 Creates a shallow copy of the current Object4. (Inherited from Object4.)
Protected method MemberwiseClone(Boolean)34 Creates a shallow copy of the current MarshalByRefObject5 object. (Inherited from MarshalByRefObject5.)
Public method Supported by the XNA Framework ResetDbType35 Resets the DbType property to its original settings.
Public method Supported by the XNA Framework ToString36 Returns a string that represents the current object. (Inherited from Object4.)
Top
  Name Description
Explicit interface implemetation Private property Supported by the XNA Framework IDbDataParameter.Precision37 Indicates the precision of numeric parameters.
Explicit interface implemetation Private property Supported by the XNA Framework IDbDataParameter.Scale38 For a description of this member, see IDbDataParameter.Scale39.
Top

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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 Requirements40.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Links Table
1http://msdn.microsoft.com/en-us/library/system.data.common.dbcommand.aspx
2http://msdn.microsoft.com/en-us/library/system.data.dataset.aspx
3http://msdn.microsoft.com/en-us/library/yy6y35y8.aspx
4http://msdn.microsoft.com/en-us/library/system.object.aspx
5http://msdn.microsoft.com/en-us/library/system.marshalbyrefobject.aspx
6http://msdn.microsoft.com/en-us/library/system.data.entityclient.entityparameter.aspx
7http://msdn.microsoft.com/en-us/library/system.data.odbc.odbcparameter.aspx
8http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbparameter.aspx
9http://msdn.microsoft.com/en-us/library/system.data.oracleclient.oracleparameter.aspx
10http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlparameter.aspx
11http://msdn.microsoft.com/en-us/library/system.data.common.aspx
12http://msdn.microsoft.com/en-us/library/system.data.common.dbparameter.dbparameter.aspx
13http://msdn.microsoft.com/en-us/library/system.data.common.dbparameter.dbtype.aspx
14http://msdn.microsoft.com/en-us/library/system.data.dbtype.aspx
15http://msdn.microsoft.com/en-us/library/system.data.common.dbparameter.direction.aspx
16http://msdn.microsoft.com/en-us/library/system.data.common.dbparameter.isnullable.aspx
17http://msdn.microsoft.com/en-us/library/system.data.common.dbparameter.parametername.aspx
18http://msdn.microsoft.com/en-us/library/system.data.common.dbparameter.size.aspx
19http://msdn.microsoft.com/en-us/library/system.data.common.dbparameter.sourcecolumn.aspx
20http://msdn.microsoft.com/en-us/library/system.data.common.dbparameter.value.aspx
21http://msdn.microsoft.com/en-us/library/system.data.common.dbparameter.sourcecolumnnullmapping.aspx
22http://msdn.microsoft.com/en-us/library/system.data.common.dbcommandbuilder.aspx
23http://msdn.microsoft.com/en-us/library/system.data.common.dbparameter.sourceversion.aspx
24http://msdn.microsoft.com/en-us/library/system.data.datarowversion.aspx
25http://msdn.microsoft.com/en-us/library/system.marshalbyrefobject.createobjref.aspx
26http://msdn.microsoft.com/en-us/library/bsc2ak47.aspx
27http://msdn.microsoft.com/en-us/library/system.object.finalize.aspx
28http://msdn.microsoft.com/en-us/library/system.object.gethashcode.aspx
29http://msdn.microsoft.com/en-us/library/system.marshalbyrefobject.getlifetimeservice.aspx
30http://msdn.microsoft.com/en-us/library/system.object.gettype.aspx
31http://msdn.microsoft.com/en-us/library/system.type.aspx
32http://msdn.microsoft.com/en-us/library/system.marshalbyrefobject.initializelifetimeservice.aspx
33http://msdn.microsoft.com/en-us/library/system.object.memberwiseclone.aspx
34http://msdn.microsoft.com/en-us/library/ms131262.aspx
35http://msdn.microsoft.com/en-us/library/system.data.common.dbparameter.resetdbtype.aspx
36http://msdn.microsoft.com/en-us/library/system.object.tostring.aspx
37http://msdn.microsoft.com/en-us/library/bb357455.aspx
38http://msdn.microsoft.com/en-us/library/bb346921.aspx
39http://msdn.microsoft.com/en-us/library/system.data.idbdataparameter.scale.aspx
40http://msdn.microsoft.com/en-us/library/8z6watww.aspx
41http://msdn.microsoft.com/en-us/library/wda6c36e.aspx
42http://go.microsoft.com/fwlink/?LinkId=217917
Community Content Add
Annotations FAQ