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

◆ Update() [1/5]

int System.Data.Common.DbDataAdapter.Update ( DataRow[] dataRows)
inline

Definition at line 776 of file DbDataAdapter.cs.

777 {
778 long scopeId = DataCommonEventSource.Log.EnterScope("<comm.DbDataAdapter.Update|API> {0}, dataRows[]", base.ObjectID);
779 try
780 {
781 int result = 0;
782 if (dataRows == null)
783 {
784 throw ADP.ArgumentNull("dataRows");
785 }
786 if (dataRows.Length != 0)
787 {
788 DataTable dataTable = null;
789 for (int i = 0; i < dataRows.Length; i++)
790 {
791 if (dataRows[i] != null && dataTable != dataRows[i].Table)
792 {
793 if (dataTable != null)
794 {
795 throw ADP.UpdateMismatchRowTable(i);
796 }
797 dataTable = dataRows[i].Table;
798 }
799 }
800 if (dataTable != null)
801 {
802 DataTableMapping tableMapping = GetTableMapping(dataTable);
803 result = Update(dataRows, tableMapping);
804 }
805 }
806 return result;
807 }
808 finally
809 {
810 DataCommonEventSource.Log.ExitScope(scopeId);
811 }
812 }
DataTableMapping GetTableMapping(DataTable dataTable)

References System.Data.Common.ADP.ArgumentNull(), System.Data.Common.DbDataAdapter.GetTableMapping(), System.Data.DataCommonEventSource.Log, System.Data.Update, and System.Data.Common.ADP.UpdateMismatchRowTable().