SqlCeParameter.SqlCeParameter(String, SqlDbType) Constructor
Initializes a new instance of the SqlCeParameter class with the parameter name and data type.
Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in system.data.sqlserverce.dll)
Syntax
'Declaration
Public Sub New ( _
name As String, _
dataType As SqlDbType _
)
'Usage
Dim name As String
Dim dataType As SqlDbType
Dim instance As New SqlCeParameter(name, dataType)
public SqlCeParameter (
string name,
SqlDbType dataType
)
public:
SqlCeParameter (
String^ name,
SqlDbType dataType
)
public SqlCeParameter (
String name,
SqlDbType dataType
)
public function SqlCeParameter (
name : String,
dataType : SqlDbType
)
Not applicable.
Parameters
- name
The name of the parameter to map.
- dataType
One of the SqlDbType values.
Remarks
The data type and, if appropriate, Size and Precision are inferred from the value of the dataType parameter.
Example
The following example creates a SqlCeParameter and sets some of its properties.
Dim param As New SqlCeParameter("@Description", SqlDbType.NVarChar)
param.Value = "garden hose"
SqlCeParameter param = new SqlCeParameter("@Description", SqlDbType.NVarChar);
param.Value = "garden hose";
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