SqlCeParameter Constructor (String, SqlDbType)
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 _
)
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
)
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
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