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

◆ Fill() [10/11]

virtual int System.Data.Common.DbDataAdapter.Fill ( DataTable[] dataTables,
int startRecord,
int maxRecords,
IDbCommand command,
CommandBehavior behavior )
inlineprotectedvirtual

Definition at line 538 of file DbDataAdapter.cs.

539 {
540 long scopeId = DataCommonEventSource.Log.EnterScope("<comm.DbDataAdapter.Fill|API> {0}, dataTables[], startRecord, maxRecords, command, behavior={1}", base.ObjectID, behavior);
541 try
542 {
543 if (dataTables == null || dataTables.Length == 0 || dataTables[0] == null)
544 {
545 throw ADP.FillRequires("dataTable");
546 }
547 if (startRecord < 0)
548 {
549 throw ADP.InvalidStartRecord("startRecord", startRecord);
550 }
551 if (maxRecords < 0)
552 {
553 throw ADP.InvalidMaxRecords("maxRecords", maxRecords);
554 }
555 if (1 < dataTables.Length && (startRecord != 0 || maxRecords != 0))
556 {
557 throw ADP.OnlyOneTableForStartRecordOrMaxRecords();
558 }
559 if (command == null)
560 {
561 throw ADP.MissingSelectCommand("Fill");
562 }
563 if (1 == dataTables.Length)
564 {
565 behavior |= CommandBehavior.SingleResult;
566 }
568 }
569 finally
570 {
571 DataCommonEventSource.Log.ExitScope(scopeId);
572 }
573 }
int FillInternal(DataSet dataset, DataTable[] datatables, int startRecord, int maxRecords, string srcTable, IDbCommand command, CommandBehavior behavior)

References System.Data.Common.DbDataAdapter.FillInternal(), System.Data.Common.ADP.FillRequires(), System.Data.Common.ADP.InvalidMaxRecords(), System.Data.Common.ADP.InvalidStartRecord(), System.Data.DataCommonEventSource.Log, System.Data.Common.ADP.MissingSelectCommand(), and System.Data.Common.ADP.OnlyOneTableForStartRecordOrMaxRecords().