SqlCeCommand Constructor
Initializes a new instance of the SqlCeCommand class.
Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)
Syntax
'Declaration
<SecurityCriticalAttribute> _
<SecurityTreatAsSafeAttribute> _
Public Sub New
'Usage
Dim instance As New SqlCeCommand()
[SecurityCriticalAttribute]
[SecurityTreatAsSafeAttribute]
public SqlCeCommand()
[SecurityCriticalAttribute]
[SecurityTreatAsSafeAttribute]
public:
SqlCeCommand()
[<SecurityCriticalAttribute>]
[<SecurityTreatAsSafeAttribute>]
new : unit -> SqlCeCommand
public function SqlCeCommand()
Remarks
The base constructor initializes all fields to their default values. The following table shows initial property values for an instance of SqlCeCommand.
Properties |
Initial Value |
---|---|
empty string ("") |
|
Text |
|
null |
Examples
The following example creates a SqlCeCommand and sets some of its properties.
Dim cmd As SqlCeCommand = conn.CreateCommand()
cmd.CommandText = "SELECT * FROM Categories ORDER BY CategoryID"
cmd.CommandType = CommandType.Text
cmd.UpdatedRowSource = UpdateRowSource.Both
SqlCeCommand cmd = conn.CreateCommand();
cmd.CommandText = "SELECT * FROM Categories ORDER BY CategoryID";
cmd.CommandType = CommandType.Text;
cmd.UpdatedRowSource = UpdateRowSource.Both;