Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ InitializeCommand()

virtual DbCommand System.Data.Common.DbCommandBuilder.InitializeCommand ( DbCommand? command)
inlineprotectedvirtual

Definition at line 1174 of file DbCommandBuilder.cs.

1175 {
1176 if (command == null)
1177 {
1178 DbCommand selectCommand = GetSelectCommand();
1179 command = selectCommand.Connection.CreateCommand();
1180 command.CommandTimeout = selectCommand.CommandTimeout;
1181 command.Transaction = selectCommand.Transaction;
1182 }
1183 command.CommandType = CommandType.Text;
1184 command.UpdatedRowSource = UpdateRowSource.None;
1185 return command;
1186 }

References System.Data.Common.DbCommand.CommandTimeout, System.Data.Common.DbCommand.Connection, System.Data.Common.DbConnection.CreateCommand(), System.Data.Common.DbCommandBuilder.GetSelectCommand(), and System.Data.Common.DbCommand.Transaction.

Referenced by System.Data.Common.DbCommandBuilder.BuildDeleteCommand(), System.Data.Common.DbCommandBuilder.BuildInsertCommand(), and System.Data.Common.DbCommandBuilder.BuildUpdateCommand().