Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ Fill() [2/4]

virtual int System.Data.Common.DataAdapter.Fill ( DataSet dataSet,
string srcTable,
IDataReader dataReader,
int startRecord,
int maxRecords )
inlineprotectedvirtualinherited

Definition at line 376 of file DataAdapter.cs.

377 {
378 long scopeId = DataCommonEventSource.Log.EnterScope("<comm.DataAdapter.Fill|API> {0}, dataSet, srcTable, dataReader, startRecord, maxRecords", ObjectID);
379 try
380 {
381 if (dataSet == null)
382 {
383 throw ADP.FillRequires("dataSet");
384 }
385 if (string.IsNullOrEmpty(srcTable))
386 {
387 throw ADP.FillRequiresSourceTableName("srcTable");
388 }
389 if (dataReader == null)
390 {
391 throw ADP.FillRequires("dataReader");
392 }
393 if (startRecord < 0)
394 {
395 throw ADP.InvalidStartRecord("startRecord", startRecord);
396 }
397 if (maxRecords < 0)
398 {
399 throw ADP.InvalidMaxRecords("maxRecords", maxRecords);
400 }
401 if (dataReader.IsClosed)
402 {
403 return 0;
404 }
406 return FillFromReader(dataSet, null, srcTable, dataReader2, startRecord, maxRecords);
407 }
408 finally
409 {
410 DataCommonEventSource.Log.ExitScope(scopeId);
411 }
412 }
virtual bool ReturnProviderSpecificTypes
int FillFromReader(DataSet dataset, DataTable datatable, string srcTable, DataReaderContainer dataReader, int startRecord, int maxRecords)
static DataReaderContainer Create(IDataReader dataReader, bool returnProviderSpecificTypes)

References System.Data.ProviderBase.DataReaderContainer.Create(), System.Data.Common.DataAdapter.FillFromReader(), System.Data.Common.ADP.FillRequires(), System.Data.Common.ADP.FillRequiresSourceTableName(), System.Data.Common.ADP.InvalidMaxRecords(), System.Data.Common.ADP.InvalidStartRecord(), System.Data.IDataReader.IsClosed, System.Data.DataCommonEventSource.Log, System.Data.Common.DataAdapter.ObjectID, and System.Data.Common.DataAdapter.ReturnProviderSpecificTypes.