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

◆ Update() [4/5]

int System.Data.Common.DbDataAdapter.Update ( DataSet dataSet,
string srcTable )
inline

Definition at line 847 of file DbDataAdapter.cs.

848 {
849 long scopeId = DataCommonEventSource.Log.EnterScope("<comm.DbDataAdapter.Update|API> {0}, dataSet, srcTable='{1}'", base.ObjectID, srcTable);
850 try
851 {
852 if (dataSet == null)
853 {
854 throw ADP.UpdateRequiresNonNullDataSet("dataSet");
855 }
856 if (string.IsNullOrEmpty(srcTable))
857 {
858 throw ADP.UpdateRequiresSourceTableName("srcTable");
859 }
860 int result = 0;
862 MissingSchemaAction updateSchemaAction = UpdateSchemaAction;
863 DataTable dataTableBySchemaAction = tableMappingBySchemaAction.GetDataTableBySchemaAction(dataSet, updateSchemaAction);
864 if (dataTableBySchemaAction != null)
865 {
867 }
868 else if (!HasTableMappings() || -1 == base.TableMappings.IndexOf(tableMappingBySchemaAction))
869 {
870 throw ADP.UpdateRequiresSourceTable(srcTable);
871 }
872 return result;
873 }
874 finally
875 {
876 DataCommonEventSource.Log.ExitScope(scopeId);
877 }
878 }
DataTableMapping GetTableMappingBySchemaAction(string sourceTableName, string dataSetTableName, MissingMappingAction mappingAction)
MissingMappingAction UpdateMappingAction
int UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping)
MissingSchemaAction UpdateSchemaAction

References System.Data.Common.DataAdapter.GetTableMappingBySchemaAction(), System.Data.Common.DataAdapter.HasTableMappings(), System.Data.DataCommonEventSource.Log, System.Data.Common.DbDataAdapter.UpdateFromDataTable(), System.Data.Common.DbDataAdapter.UpdateMappingAction, System.Data.Common.ADP.UpdateRequiresNonNullDataSet(), System.Data.Common.ADP.UpdateRequiresSourceTable(), System.Data.Common.ADP.UpdateRequiresSourceTableName(), and System.Data.Common.DbDataAdapter.UpdateSchemaAction.