Επεξεργασία

Κοινή χρήση μέσω


DbCommandBuilder.InitializeCommand(DbCommand) Method

Definition

Resets the CommandTimeout, Transaction, CommandType, and UpdateRowSource properties on the DbCommand.

protected:
 virtual System::Data::Common::DbCommand ^ InitializeCommand(System::Data::Common::DbCommand ^ command);
protected virtual System.Data.Common.DbCommand InitializeCommand (System.Data.Common.DbCommand? command);
protected virtual System.Data.Common.DbCommand InitializeCommand (System.Data.Common.DbCommand command);
abstract member InitializeCommand : System.Data.Common.DbCommand -> System.Data.Common.DbCommand
override this.InitializeCommand : System.Data.Common.DbCommand -> System.Data.Common.DbCommand
Protected Overridable Function InitializeCommand (command As DbCommand) As DbCommand

Parameters

command
DbCommand

The DbCommand to be used by the command builder for the corresponding insert, update, or delete command.

Returns

A DbCommand instance to use for each insert, update, or delete operation. Passing a null value allows the InitializeCommand(DbCommand) method to create a DbCommand object based on the Select command associated with the DbCommandBuilder.

Remarks

This method is intended for use by provider writers building a custom command builder.

Applies to

See also