Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SqlCeParameter Class

Represents a parameter to a SqlCeCommand and, optionally, its mapping to a DataSet column. This class cannot be inherited.

System.Object
  System.MarshalByRefObject
    System.Data.Common.DbParameter
      System.Data.SqlServerCe.SqlCeParameter

Namespace:  System.Data.SqlServerCe
Assembly:  System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)
public sealed class SqlCeParameter : DbParameter, 
	ICloneable

The SqlCeParameter type exposes the following members.

  NameDescription
Public methodSqlCeParameter()Initializes a new instance of the SqlCeParameter class.
Public methodSqlCeParameter(String, SqlDbType)Initializes a new instance of the SqlCeParameter class with the parameter name and data type.
Public methodSqlCeParameter(String, Object)Initializes a new instance of the SqlCeParameter class with the parameter name and the value of the new SqlCeParameter.
Public methodSqlCeParameter(String, SqlDbType, Int32)Initializes a new instance of the SqlCeParameter class with the parameter name, data type, and length.
Public methodSqlCeParameter(String, SqlDbType, Int32, String)Initializes a new instance of the SqlCeParameter class with the parameter name, data type, length, and source column name.
Public methodSqlCeParameter(String, SqlDbType, Int32, Boolean, Byte, Byte, String, DataRowVersion, Object)Initializes a new instance of the SqlCeParameter class with the parameter name, data type, length, and other properties. SQL Server Compact supports only input parameters.
Public methodSqlCeParameter(String, SqlDbType, Int32, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object)Initializes a new instance of the SqlCeParameter class with the parameter name, data type, length, parameter direction, and other properties. SQL Server Compact only supports input parameters.
Top
  NameDescription
Public propertyDbTypeGets or sets the DbType of the parameter. (Overrides DbParameter.DbType.)
Public propertyDirectionThis property always returns ParameterDirection.Input for .NET Compact Framework Data Provider for SQL Server Compact. Setting this property to a different value causes an InvalidOperationException to be thrown. (Overrides DbParameter.Direction.)
Public propertyIsNullableGets or sets a value indicating whether or not the parameter accepts null values. (Overrides DbParameter.IsNullable.)
Public propertyOffsetInfrastructure.
Public propertyParameterNameGets or sets the name of the SqlCeParameter. (Overrides DbParameter.ParameterName.)
Public propertyPrecisionGets or sets the maximum number of digits used to represent the Value property.
Public propertyScaleGets or sets the number of decimal places to which Value is resolved.
Public propertySizeGets or sets the maximum length of the data within the column. (Overrides DbParameter.Size.)
Public propertySourceColumnGets or sets the name of the source column mapped to the DataSet and used for loading or returning the Value. (Overrides DbParameter.SourceColumn.)
Public propertySourceColumnNullMappingInfrastructure. (Overrides DbParameter.SourceColumnNullMapping.)
Public propertySourceVersionGets or sets the DataRowVersion to use when loading Value. (Overrides DbParameter.SourceVersion.)
Public propertySqlDbTypeGets or sets the SqlDbType of the parameter.
Public propertyValueGets or sets the value of the parameter. (Overrides DbParameter.Value.)
Top
  NameDescription
Public methodCreateObjRef (inherited from MarshalByRefObject)
Public methodEquals (inherited from Object)
Protected methodFinalize (inherited from Object)
Public methodGetHashCode (inherited from Object)
Public methodGetLifetimeService (inherited from MarshalByRefObject)
Public methodGetType (inherited from Object)
Public methodInitializeLifetimeService (inherited from MarshalByRefObject)
Protected methodMemberwiseClone() (inherited from Object)
Protected methodMemberwiseClone(Boolean) (inherited from MarshalByRefObject)
Public methodResetDbTypeResets the type associated with this SqlCeParameter. (Overrides DbParameter.ResetDbType().)
Public methodToStringGets a string containing the ParameterName. (Overrides Object.ToString().)
Top
  NameDescription
Explicit interface implemetationPrivate methodICloneable.Clone
Explicit interface implemetationPrivate propertyIDbDataParameter.Precision (inherited from DbParameter)
Explicit interface implemetationPrivate propertyIDbDataParameter.Scale (inherited from DbParameter)
Top

Parameter names are not case-sensitive.

The following example shows a typical use of SqlCeParameter.

SqlCeParameter param = new SqlCeParameter("@Description", SqlDbType.NVarChar);
param.Value = "garden hose";


Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.