internal static DbSchemaRow[] GetSortedSchemaRows(DataTable dataTable, bool returnProviderSpecificTypes) { DataColumn?sortindex = dataTable.Columns[SchemaMappingUnsortedIndex]; if (null == sortindex) { sortindex = new DataColumn(SchemaMappingUnsortedIndex, typeof(int)); dataTable.Columns.Add(sortindex); } int count = dataTable.Rows.Count; for (int i = 0; i < count; ++i) { dataTable.Rows[i][sortindex] = i; } ; DbSchemaTable schemaTable = new DbSchemaTable(dataTable, returnProviderSpecificTypes); DataRow[] dataRows = SelectRows(dataTable, returnProviderSpecificTypes); Debug.Assert(null != dataRows, "GetSchemaRows: unexpected null dataRows"); DbSchemaRow[] schemaRows = new DbSchemaRow[dataRows.Length]; for (int i = 0; i < dataRows.Length; ++i) { schemaRows[i] = new DbSchemaRow(schemaTable, dataRows[i]); } return(schemaRows); }
static internal DbSchemaRow[] GetSortedSchemaRows(DataTable dataTable, bool returnProviderSpecificTypes) // MDAC 60609 { DataColumn sortindex = dataTable.Columns[SchemaMappingUnsortedIndex]; if (null == sortindex) // WebData 100390 { sortindex = new DataColumn(SchemaMappingUnsortedIndex, typeof(Int32)); // MDAC 67050 dataTable.Columns.Add(sortindex); } int count = dataTable.Rows.Count; for (int i = 0; i < count; ++i) { dataTable.Rows[i][sortindex] = i; } ; DbSchemaTable schemaTable = new DbSchemaTable(dataTable, returnProviderSpecificTypes); const DataViewRowState rowStates = DataViewRowState.Unchanged | DataViewRowState.Added | DataViewRowState.ModifiedCurrent; DataRow[] dataRows = dataTable.Select(null, "ColumnOrdinal ASC", rowStates); Debug.Assert(null != dataRows, "GetSchemaRows: unexpected null dataRows"); DbSchemaRow[] schemaRows = new DbSchemaRow[dataRows.Length]; for (int i = 0; i < dataRows.Length; ++i) { schemaRows[i] = new DbSchemaRow(schemaTable, dataRows[i]); } return(schemaRows); }
internal static DbSchemaRow[] GetSortedSchemaRows(DataTable dataTable, bool returnProviderSpecificTypes) { DataColumn sortindex = dataTable.Columns[SchemaMappingUnsortedIndex]; if (null == sortindex) { sortindex = new DataColumn(SchemaMappingUnsortedIndex, typeof(int)); dataTable.Columns.Add(sortindex); } int count = dataTable.Rows.Count; for (int i = 0; i < count; ++i) { dataTable.Rows[i][sortindex] = i; }; DbSchemaTable schemaTable = new DbSchemaTable(dataTable, returnProviderSpecificTypes); const DataViewRowState rowStates = DataViewRowState.Unchanged | DataViewRowState.Added | DataViewRowState.ModifiedCurrent; DataRow[] dataRows = dataTable.Select(null, "ColumnOrdinal ASC", rowStates); Debug.Assert(null != dataRows, "GetSchemaRows: unexpected null dataRows"); DbSchemaRow[] schemaRows = new DbSchemaRow[dataRows.Length]; for (int i = 0; i < dataRows.Length; ++i) { schemaRows[i] = new DbSchemaRow(schemaTable, dataRows[i]); } return schemaRows; }
internal static DbSchemaRow[] GetSortedSchemaRows(DataTable dataTable, bool returnProviderSpecificTypes) { DataColumn column = dataTable.Columns["SchemaMapping Unsorted Index"]; if (column == null) { column = new DataColumn("SchemaMapping Unsorted Index", typeof(int)); dataTable.Columns.Add(column); } int count = dataTable.Rows.Count; for (int i = 0; i < count; i++) { dataTable.Rows[i][column] = i; } DbSchemaTable schemaTable = new DbSchemaTable(dataTable, returnProviderSpecificTypes); System.Data.DataRow[] rowArray = dataTable.Select(null, "ColumnOrdinal ASC", DataViewRowState.CurrentRows); DbSchemaRow[] rowArray2 = new DbSchemaRow[rowArray.Length]; for (int j = 0; j < rowArray.Length; j++) { rowArray2[j] = new DbSchemaRow(schemaTable, rowArray[j]); } return(rowArray2); }
internal static DbSchemaRow[] GetSortedSchemaRows(DataTable dataTable, bool returnProviderSpecificTypes) { DataColumn column = dataTable.Columns["SchemaMapping Unsorted Index"]; if (column == null) { column = new DataColumn("SchemaMapping Unsorted Index", typeof(int)); dataTable.Columns.Add(column); } int count = dataTable.Rows.Count; for (int i = 0; i < count; i++) { dataTable.Rows[i][column] = i; } DbSchemaTable schemaTable = new DbSchemaTable(dataTable, returnProviderSpecificTypes); System.Data.DataRow[] rowArray = dataTable.Select(null, "ColumnOrdinal ASC", DataViewRowState.CurrentRows); DbSchemaRow[] rowArray2 = new DbSchemaRow[rowArray.Length]; for (int j = 0; j < rowArray.Length; j++) { rowArray2[j] = new DbSchemaRow(schemaTable, rowArray[j]); } return rowArray2; }
internal DbSchemaRow(DbSchemaTable schemaTable, DataRow dataRow) { _schemaTable = schemaTable; _dataRow = dataRow; }
internal DbSchemaRow(DbSchemaTable schemaTable, System.Data.DataRow dataRow) { this.schemaTable = schemaTable; this.dataRow = dataRow; }
internal DbSchemaRow(DbSchemaTable schemaTable, DataRow dataRow) { this.schemaTable = schemaTable; this.dataRow = dataRow; }
internal DbSchemaRow(DbSchemaTable schemaTable, DataRow dataRow) { _schemaTable = schemaTable; _dataRow = dataRow; }