Constructeur SqlCeCommand

Initialise une nouvelle instance de la classe SqlCeCommand.

Espace de noms :  System.Data.SqlServerCe
Assembly :  System.Data.SqlServerCe (en System.Data.SqlServerCe.dll)

Syntaxe

'Déclaration
<SecurityCriticalAttribute> _
<SecurityTreatAsSafeAttribute> _
Public Sub New
'Utilisation

Dim instance As New SqlCeCommand()
[SecurityCriticalAttribute]
[SecurityTreatAsSafeAttribute]
public SqlCeCommand()
[SecurityCriticalAttribute]
[SecurityTreatAsSafeAttribute]
public:
SqlCeCommand()
[<SecurityCriticalAttribute>]
[<SecurityTreatAsSafeAttribute>]
new : unit -> SqlCeCommand
public function SqlCeCommand()

Notes

Le constructeur de base rétablit les valeurs par défaut de tous les champs. Le tableau suivant indique les valeurs de propriété initiales d'une instance de SqlCeCommand.

Propriétés

Valeur initiale

CommandText

Chaîne vide ("")

CommandType

Texte

Connection

null

Exemples

L'exemple suivant crée un SqlCeCommand et définit certaines de ses propriétés.

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;

Voir aussi

Référence

SqlCeCommand Classe

Surcharge SqlCeCommand

Espace de noms System.Data.SqlServerCe