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

◆ FillInternal()

int System.Data.Common.DbDataAdapter.FillInternal ( DataSet dataset,
DataTable[] datatables,
int startRecord,
int maxRecords,
string srcTable,
IDbCommand command,
CommandBehavior behavior )
inlineprivate

Definition at line 575 of file DbDataAdapter.cs.

576 {
577 int result = 0;
578 bool flag = command.Connection == null;
579 try
580 {
581 IDbConnection connection = GetConnection3(this, command, "Fill");
583 if (MissingSchemaAction.AddWithKey == base.MissingSchemaAction)
584 {
585 behavior |= CommandBehavior.KeyInfo;
586 }
587 try
588 {
589 QuietOpen(connection, out originalState);
590 behavior |= CommandBehavior.SequentialAccess;
591 IDataReader dataReader = null;
592 try
593 {
594 dataReader = command.ExecuteReader(behavior);
596 }
597 finally
598 {
599 dataReader?.Dispose();
600 }
601 }
602 finally
603 {
604 QuietClose(connection, originalState);
605 }
606 }
607 finally
608 {
609 if (flag)
610 {
611 command.Transaction = null;
612 command.Connection = null;
613 }
614 }
615 return result;
616 }
static IDbConnection GetConnection3(DbDataAdapter adapter, IDbCommand command, string method)
static void QuietOpen(IDbConnection connection, out ConnectionState originalState)
static void QuietClose(IDbConnection connection, ConnectionState originalState)

References System.ComponentModel.Fill, System.Data.Common.DbDataAdapter.GetConnection3(), System.Data.Common.DbDataAdapter.QuietClose(), and System.Data.Common.DbDataAdapter.QuietOpen().

Referenced by System.Data.Common.DbDataAdapter.Fill(), and System.Data.Common.DbDataAdapter.Fill().