Share via


SqlCeParameter Constructor (String, SqlDbType, Int32, String)

Initializes a new instance of the SqlCeParameter class with the parameter name, data type, length, and source column name.

Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in system.data.sqlserverce.dll)

Syntax

'Declaration
Public Sub New ( _
    name As String, _
    dataType As SqlDbType, _
    size As Integer, _
    sourceColumn As String _
)
public SqlCeParameter (
    string name,
    SqlDbType dataType,
    int size,
    string sourceColumn
)
public:
SqlCeParameter (
    String^ name, 
    SqlDbType dataType, 
    int size, 
    String^ sourceColumn
)
public SqlCeParameter (
    String name, 
    SqlDbType dataType, 
    int size, 
    String sourceColumn
)
public function SqlCeParameter (
    name : String, 
    dataType : SqlDbType, 
    size : int, 
    sourceColumn : String
)

Parameters

  • name
    The name of the parameter to map.
  • size
    The length of the parameter.
  • sourceColumn
    The name of the source column.

Remarks

Size is inferred from the value of the dataType parameter if it is not explicitly set in the size parameter.

Example

The following example creates a SqlCeParameter and sets some of its properties.

Dim param As New SqlCeParameter("@Description", SqlDbType.NVarChar, 88, "Description")
param.IsNullable = True
SqlCeParameter param = new SqlCeParameter("@Description", SqlDbType.NVarChar,
    88, "Description");
param.IsNullable = true;

Platforms

Development Platforms

Windows Vista, Windows Mobile 5.0, Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Mobile 2003 for Pocket PC, Windows CE 5.0
Version Information
.NET Framework and NET Compact Framework
Supported in 3.5
.NET Framework
Supported in 3.0
.NET Compact Framework and .Net Framework
Supported in 2.0

See Also

Reference

SqlCeParameter Class
SqlCeParameter Members
System.Data.SqlServerCe Namespace