DataCommand.Prepare, méthode (String, DataCommandType, array<IVsDataParameter[])

Prépare la commande spécifiée dans la source de données à exécuter ; la commande peut ensuite s'exécuter plusieurs fois, dans des paramètres.

Espace de noms :  Microsoft.VisualStudio.Data.Framework
Assembly :  Microsoft.VisualStudio.Data.Framework (dans Microsoft.VisualStudio.Data.Framework.dll)

Syntaxe

'Déclaration
Public Function Prepare ( _
    command As String, _
    commandType As DataCommandType, _
    parameters As IVsDataParameter() _
) As String
public string Prepare(
    string command,
    DataCommandType commandType,
    IVsDataParameter[] parameters
)
public:
virtual String^ Prepare(
    String^ command, 
    DataCommandType commandType, 
    array<IVsDataParameter^>^ parameters
) sealed
abstract Prepare : 
        command:string * 
        commandType:DataCommandType * 
        parameters:IVsDataParameter[] -> string  
override Prepare : 
        command:string * 
        commandType:DataCommandType * 
        parameters:IVsDataParameter[] -> string
public final function Prepare(
    command : String, 
    commandType : DataCommandType, 
    parameters : IVsDataParameter[]
) : String

Paramètres

  • command
    Type : String

    Une commande d'exécution spécifique à une source de données.

Valeur de retour

Type : String
Identificateur de la commande préparée qui peut ensuite être passée à l'Execute ou la méthode ExecuteWithoutResults à l'aide du type de commande Prepared.

Implémentations

IVsDataCommand.Prepare(String, DataCommandType, array<IVsDataParameter[])

Exceptions

Exception Condition
ArgumentNullException

Le paramètre command est nullune référence null (Nothing en Visual Basic).

ArgumentOutOfRangeException

Le paramètre commandTimeout est inférieur à -1.

Notes

D'autres exceptions qui se produisent indiquent que la préparation a échoué pour une raison fournisseur- spécifiée.

Sécurité .NET Framework

Voir aussi

Référence

DataCommand Classe

Prepare, surcharge

Microsoft.VisualStudio.Data.Framework, espace de noms

DataCommand