SqlCeParameter.SqlCeParameter(String, SqlDbType, Int32) Constructor
Initializes a new instance of the SqlCeParameter class with the parameter name, data type, and length.
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 _
)
'Usage
Dim name As String
Dim dataType As SqlDbType
Dim size As Integer
Dim instance As New SqlCeParameter(name, dataType, size)
public SqlCeParameter (
string name,
SqlDbType dataType,
int size
)
public:
SqlCeParameter (
String^ name,
SqlDbType dataType,
int size
)
public SqlCeParameter (
String name,
SqlDbType dataType,
int size
)
public function SqlCeParameter (
name : String,
dataType : SqlDbType,
size : int
)
Not applicable.
Parameters
- name
The name of the parameter to map.
- dataType
One of the SqlDbType values.
- size
The length of the parameter.
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)
param.IsNullable = True
SqlCeParameter param = new SqlCeParameter("@Description", SqlDbType.NVarChar, 88);
param.IsNullable = true;
Platforms
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows XP Professional x64 Edition, Windows XP SP2
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Framework
Supported in: 3.0
.NET Compact Framework
Supported in: 2.0, 1.0
See Also
Reference
SqlCeParameter Class
SqlCeParameter Members
System.Data.SqlServerCe Namespace