273 references to Tables
Accessibility_Core_App (9)
DataBindingExample.cs (9)
73if (dataSet.Tables[0].Rows.Count > 0) 75for (int i = 0; i < dataSet.Tables[0].Rows.Count; i++) 79Text = dataSet.Tables[0].Rows[i]["StuName"].ToString() 91int row_Count = dataSet.Tables[0].Rows.Count; 92int col_Count = dataSet.Tables[0].Columns.Count; 96string colName = dataSet.Tables[0].Columns[j].ColumnName; 102string itemName = dataSet.Tables[0].Rows[i][0].ToString(); 108item.SubItems.Add(dataSet.Tables[0].Rows[i][j].ToString()); 140stuDS.Tables.Add(stuTable);
PresentationFramework-SystemData (2)
SystemDataExtension.cs (2)
58dataset.Tables.Add(table1); 63dataset.Tables.Add(table2);
System.Data.Common (246)
System\Data\Common\DataTableMapping.cs (1)
139DataTableCollection tables = dataSet.Tables;
System\Data\ConstraintCollection.cs (2)
809parents[j] = _table.DataSet.Tables[constr._parentTableName]!.Columns[constr._parentColumnNames[j]]!; 811parents[j] = _table.DataSet.Tables[constr._parentTableName, constr._parentTableNamespace]!.Columns[constr._parentColumnNames[j]]!;
System\Data\ConstraintEnumerator.cs (1)
20_tables = dataSet?.Tables.GetEnumerator();
System\Data\DataRelation.cs (2)
718DataTable parent = destination.Tables[ParentTable.TableName, ParentTable.Namespace]!; 719DataTable child = destination.Tables[ChildTable.TableName, ChildTable.Namespace]!;
System\Data\DataRelationCollection.cs (4)
892parents[j] = _dataSet.Tables[rel._parentTableName!]!.Columns[rel._parentColumnNames[j]]!; 896parents[j] = _dataSet.Tables[rel._parentTableName!, rel._parentTableNamespace]!.Columns[rel._parentColumnNames[j]]!; 901childs[j] = _dataSet.Tables[rel._childTableName!]!.Columns[rel._childColumnNames[j]]!; 905childs[j] = _dataSet.Tables[rel._childTableName!, rel._childTableNamespace]!.Columns[rel._childColumnNames[j]]!;
System\Data\DataSet.cs (95)
134for (int i = 0; i < Tables.Count; i++) 136Tables[i].RemotingFormat = value; 352info.AddValue("DataSet.Tables.Count", Tables.Count); 355for (int i = 0; i < Tables.Count; i++) 361bf.Serialize(memStream, Tables[i]); 369for (int i = 0; i < Tables.Count; i++) 371Tables[i].SerializeConstraints(info, i, true); 378for (int i = 0; i < Tables.Count; i++) 380Tables[i].SerializeExpressionColumns(info, i); 390for (int i = 0; i < Tables.Count; i++) 392Tables[i].SerializeTableData(info, i); 448Tables.Add(dt); 454Tables[i].DeserializeConstraints(info, /* table index */i, /* serialize all constraints */ true); // 463Tables[i].DeserializeExpressionColumns(info, i); 490for (int i = 0; i < Tables.Count; i++) 492Tables[i].DeserializeTableData(info, i); 553parentInfo[0] = Tables.IndexOf(rel.ParentTable); 560childInfo[0] = Tables.IndexOf(rel.ChildTable); 597parentkeyColumns[i] = Tables[parentInfo[0]].Columns[parentInfo[i + 1]]; 604childkeyColumns[i] = Tables[childInfo[0]].Columns[childInfo[i + 1]]; 646foreach (DataTable table in Tables) 723foreach (DataTable table in Tables) 766DataTable? conflicting = Tables[value, Namespace]; 791foreach (DataTable dt in Tables) 801if (Tables.Contains(dt.TableName, value, false, true)) 856for (int i = 0; i < Tables.Count; i++) 858if (Tables[i].HasErrors) 916foreach (DataTable table in Tables) 928foreach (DataTable table in Tables) 950foreach (DataTable table in Tables) 961if (!Tables[i].ShouldSerializeLocale()) 963Tables[i].SetLocaleValue(oldLocale, false, true); 1004for (int i = 0; i < Tables.Count; i++) 1006if (Tables[i].Site != null) 1008cont.Remove(Tables[i]); 1041/// Indicates whether <see cref='System.Data.DataSet.Tables'/> property should be persisted. 1046/// Resets the <see cref='System.Data.DataSet.Tables'/> property to its default state. 1048private void ResetTables() => Tables.Clear(); 1065for (int i = 0; i < Tables.Count; i++) 1067Tables[i].AcceptChanges(); 1095Tables.FinishInitCollection(); 1096for (int i = 0; i < Tables.Count; i++) 1098Tables[i].Columns.FinishInitCollection(); 1101for (int i = 0; i < Tables.Count; i++) 1103Tables[i].Constraints.FinishInitConstraints(); 1123for (int i = 0; i < Tables.Count; i++) 1125Tables[i].Clear(); 1153if (ds.Tables.Count > 0) // To clean up all the schema in strong typed dataset. 1170DataTableCollection tbls = Tables; 1176ds.Tables.Add(dt); 1196ds.Tables[i].Constraints.Add(constraints[j].Clone(ds)!); 1219foreach (DataTable table in Tables) 1225ds.Tables[table.TableName, table.Namespace]!.Columns[col.ColumnName]!.CopyExpressionFrom(col); 1232ds.Tables[i]._tableNamespace = tbls[i]._tableNamespace; // undo the hardcoding of the namespace 1256foreach (DataTable table in Tables) 1258DataTable destTable = dsNew.Tables[table.TableName, table.Namespace]!; 1279for (int i = 0; i < Tables.Count; i++) 1281int rowBytes = (Tables[i].TableName.Length + 4) << 2; 1282DataTable table = Tables[i]; 1338TableChanges[] bitMatrix = new TableChanges[Tables.Count]; 1341bitMatrix[i] = new TableChanges(Tables[i].Rows.Count); 1360DataTable table = Tables[i]; 1361DataTable destTable = dsNew.Tables[table.TableName, table.Namespace]!; 1393DataRowCollection rows = Tables[tableIndex].Rows; 1430int relatedTableIndex = Tables.IndexOf(relatedRow.Table); 1553for (int i = 0; i < Tables.Count; i++) 1555DataTable table = Tables[i]; 2098if (Tables.Count == 0) 2225if (!fSchemaFound && Tables.Count == 0) 2252if (!fSchemaFound && Tables.Count == 0 && !topNode.HasChildNodes) 2288Tables.Contains(root.Name, (root.NamespaceURI.Length == 0) ? null : root.NamespaceURI, false, true)) 2309if (!fSchemaFound && Tables.Count == 0) 2439foreach (DataTable table in Tables) 2472foreach (DataTable t in newDs.Tables) 2533foreach (DataTable t in newDs.Tables) 2544foreach (DataTable t in newDs.Tables) 3234for (int i = 0; i < Tables.Count; i++) 3236DataTable table = Tables[i]; 3243for (int i = 0; i < Tables.Count; i++) 3245DataTable table = Tables[i]; 3270for (int i = 0; i < Tables.Count; i++) 3272Tables[i].RejectChanges(); 3291for (int i = 0; i < Tables.Count; i++) 3293ConstraintCollection cons = Tables[i].Constraints; 3309Tables.Clear(); 3334for (int i = 0; i < Tables.Count; i++) 3336constraints = Tables[i].Constraints; 3374for (int i = 0; i < Tables.Count; i++) 3376constraints = Tables[i].Constraints; 3655DataTable? tempDT = Tables[tables[i]]; 3659Tables.Add(tempDT); 3668if (Tables.Count == 0) 3673var dataTables = new DataTable[Tables.Count]; 3674for (int i = 0; i < Tables.Count; i++) 3676dataTables[i] = Tables[i];
System\Data\DataTable.cs (35)
280ds.Tables.Add(this); 294_dataSet.Tables.Remove(this); 329Debug.Assert(ds.Tables.Count == 1, "There should be exactly 1 table here"); 330DataTable table = ds.Tables[0]; 337ds.Tables.Remove(ds.Tables[0]); 338ds.Tables.Add(this); 340ds.Tables.Remove(this); 560parentInfo[0] = allConstraints ? DataSet!.Tables.IndexOf(fk.RelatedTable) : 0; 567childInfo[0] = allConstraints ? DataSet!.Tables.IndexOf(fk.Table) : 0; //Since the constraint is on the current table, this is the child table. 634DataTable parentTable = (allConstraints == false) ? this : DataSet!.Tables[parentInfo[0]]; 642DataTable childTable = (allConstraints == false) ? this : DataSet!.Tables[childInfo[0]]; 1797_dataSet.Tables.RegisterName(value, Namespace); 1809_dataSet.Tables.RegisterName(value, Namespace); 1820_dataSet.Tables.UnregisterName(_tableName); 1918if (_dataSet.Tables.Contains(TableName, realNamespace, true, true)) 1944if (_dataSet!.Tables.Contains(childTable.TableName, realNamespace, false, true)) 2368DataTable? destinationTable = ds.Tables[sourceTable.TableName, sourceTable.Namespace]; 2381ds.Tables.Add(destinationTable); 5431ds.Tables.Add(this); 5441ds.Tables.Remove(this); 5598ds.Tables.Add(this); 5608ds.Tables.Remove(this); 6501currentTable = ds.Tables[_tableName, Namespace]; 6505int tableIndex = ds.Tables.InternalIndexOf(_tableName); 6508currentTable = ds.Tables[tableIndex]; 6522currentTable = ds.Tables[CurrentTableName, CurrentTableNamespace]; 6589dataset.Tables.Add(this); 6598DataTable destinationTable = DataSet.Tables[tempTable._tableName, tempTable.Namespace]!; 6599DataTable sourceTable = ds.Tables[tempTable._tableName, tempTable.Namespace]!; 6649DataSet.Tables[tempTable.TableName, tempTable.Namespace]!.Columns[dc.ColumnName]!.Expression = dc.Expression; 6890for (int tableIndex = 0; tableIndex < ds.Tables.Count; ++tableIndex) 6892DataTable table = ds.Tables[tableIndex]; 6912for (int tableIndex = 0; tableIndex < _targetDS.Tables.Count; ++tableIndex) 6914DataTable table = _targetDS.Tables[tableIndex];
System\Data\DataViewManager.cs (4)
35_dataSet.Tables.CollectionChanged += new CollectionChangeEventHandler(TableCollectionChanged); 67_dataSet.Tables.CollectionChanged -= new CollectionChangeEventHandler(TableCollectionChanged); 72_dataSet.Tables.CollectionChanged += new CollectionChangeEventHandler(TableCollectionChanged); 93foreach (DataTable dt in _dataSet.Tables)
System\Data\DataViewManagerListItemTypeDescriptor.cs (2)
120int tableCount = dataSet.Tables.Count; 124props[i] = new DataTablePropertyDescriptor(dataSet.Tables[i]);
System\Data\DataViewSettingCollection.cs (4)
60dt = ds.Tables[tableName]; 71dt = ds.Tables[index]; 135return (ds == null) ? 0 : ds.Tables.Count; 169_tableEnumerator = dvm.DataSet!.Tables.GetEnumerator();
System\Data\ForeignKeyConstraint.cs (6)
691iDest = destination.Tables.IndexOf(Table!.TableName); 695iDest = destination.Tables.IndexOf(Table!.TableName, Table.Namespace, false); // pass false for last param 704DataTable table = destination.Tables[iDest]; 707iDest = destination.Tables.IndexOf(RelatedTable.TableName); 711iDest = destination.Tables.IndexOf(RelatedTable.TableName, RelatedTable.Namespace, false); // pass false for last param 718DataTable relatedTable = destination.Tables[iDest];
System\Data\Merger.cs (19)
58foreach (DataTable dt in _dataSet.Tables) 67for (int i = 0; i < source.Tables.Count; i++) 69MergeTableData(source.Tables[i]); // since column expression might have dependency on relation, we do not set 88foreach (DataTable sourceTable in source.Tables) 93targetTable = _dataSet.Tables[sourceTable.TableName]!; 97targetTable = _dataSet.Tables[sourceTable.TableName, sourceTable.Namespace]!; // we know that target table won't be null since MissingSchemaAction is Add , we have already added it! 116foreach (DataTable dt in _dataSet.Tables) 162_dataSet.Tables[src.TableName] : 163_dataSet.Tables[src.TableName, src.Namespace]; 317if (_dataSet!.Tables.Contains(table.TableName, true)) 321targetTable = _dataSet.Tables[table.TableName]; 325targetTable = _dataSet.Tables[table.TableName, table.Namespace]; 342_dataSet!.Tables.Add(targetTable); 461for (int i = 0; i < source.Tables.Count; i++) 463MergeConstraints(source.Tables[i]); 571_dataSet.Tables[relation.ParentTable.TableName]! : 572_dataSet.Tables[relation.ParentTable.TableName, relation.ParentTable.Namespace]!; 575_dataSet.Tables[relation.ChildTable.TableName]! : 576_dataSet.Tables[relation.ChildTable.TableName, relation.ChildTable.Namespace]!;
System\Data\ProviderBase\SchemaMapping.cs (3)
556table?.DataSet?.Tables.Remove(table); 723_dataSet.Tables.Add(_dataTable); 1071_dataSet.Tables.Add(_dataTable);
System\Data\TypeLimiter.cs (1)
121? dataSet.Tables.Cast<DataTable>().SelectMany(GetPreviouslyDeclaredDataTypes)
System\Data\UniqueConstraint.cs (3)
281iDest = destination.Tables.IndexOf(Table!.TableName); 285iDest = destination.Tables.IndexOf(Table!.TableName, Table.Namespace, false); // pass false for last param to be backward compatible 290DataTable table = destination.Tables[iDest];
System\Data\XDRSchema.cs (5)
64if (ds.Tables[_schemaName] == null) 565table = dataSet.Tables.GetTable(typeName, _schemaUri); 581_ds.Tables.Add(table); 652table = dataSet.Tables.GetTable(typeName, _schemaUri); 670_ds.Tables.Add(table);
System\Data\XMLDiffLoader.cs (3)
191table = ds.Tables.GetTable(XmlConvert.DecodeName(ssync.LocalName), ssync.NamespaceURI); 277return _dataSet!.Tables.GetTable(tableName, ns); 299table = ds.Tables.GetTable(XmlConvert.DecodeName(row.LocalName), row.NamespaceURI);
System\Data\xmlsaver.cs (17)
332foreach (DataTable dt in ds.Tables) 350for (int t = 0; t < ds.Tables.Count; t++) 352DataTable table = ds.Tables[t]; 419foreach (DataTable dt in ds.Tables) 561foreach (DataTable table in ds.Tables) 1164if ((_ds == null) || (_ds.Tables.InternalIndexOf(rel.ParentKey.Table.TableName) == -3)) 1167if ((_ds == null) || (_ds.Tables.InternalIndexOf(rel.ChildKey.Table.TableName) == -3)) 2012if ((_ds == null) || (_ds.Tables.InternalIndexOf(table.TableName) == -3)) 2094if ((_ds == null) || (_ds.Tables.InternalIndexOf(table.TableName) == -3)) 2140if ((_ds == null) || (_ds.Tables.InternalIndexOf(foreign.RelatedTable.TableName) == -3)) // if there is a conflicting name/namespace only 2281for (int i = 0; i < ds.Tables.Count; i++) 2283_tables.Add(ds.Tables[i]); 2375for (int i = 0; i < _ds!.Tables.Count; ++i) 2377GenerateTable(_ds.Tables[i]); 2393for (int i = 0; i < _ds!.Tables.Count; ++i) 2395GenerateTableErrors(_ds.Tables[i]); 2696foreach (DataTable table in ds.Tables)
System\Data\XMLSchema.cs (22)
416DataTable? table = _ds!.Tables.GetTable(XmlConvert.DecodeName(typeName), element.QualifiedName.Namespace); 480parent = _ds.Tables.GetTableSmart(parentName, parentNs); 485child = _ds.Tables.GetTableSmart(childName, childNs); 659bool newDataSet = (ds.Tables.Count == 0); 693foreach (DataTable dt in ds.Tables) 810foreach (DataTable dt in ds!.Tables) 828DataTable? tmpTable = ds.Tables[ds.DataSetName, ds.Namespace]; 834if (FromInference && ds.Tables.Count == 0 && string.Equals(ds.DataSetName, "NewDataSet", StringComparison.Ordinal)) 844if (ds.Tables.Count > 0) 846ds.Namespace = ds.Tables[0].Namespace; 847ds.Prefix = ds.Tables[0].Prefix; 1291DataTable? table = _ds!.Tables.GetTableSmart(tableName, tableNs); 1402DataTable? table = _ds!.Tables.GetTableSmart(tableName, tableNs); 1449table = _ds!.Tables.GetTable(typeName, _TableUri); 1506if (!FromInference || _ds.Tables.GetTable(typeName, _TableUri) == null) 1508_ds.Tables.Add(table); 1566table = _ds!.Tables.GetTable(XmlConvert.DecodeName(typeName), _TableUri); 1633_ds.Tables.Add(table); 1696if (_tableChild.DataSet!.Tables.InternalIndexOf(_tableChild.TableName) < -1) 2644DataTable? tempTable = _ds.Tables.GetTable(XmlConvert.DecodeName(GetInstanceName((XmlSchemaElement)el)), node.QualifiedName.Namespace); 2719List<DataTable> _tableList = new List<DataTable>(_ds.Tables.Count); 2724_ds.Tables.ReplaceFromInference(_tableList); // replace the list with the one in correct order: BackWard compatibility for inference
System\Data\XmlToDatasetMap.cs (4)
264_tableSchemaMap = new XmlNodeIdHashtable(dataSet.Tables.Count); 266foreach (DataTable t in dataSet.Tables) 287_tableSchemaMap = new XmlNodeIdHashtable(dataSet.Tables.Count); 300foreach (DataTable t in dataSet.Tables)
System\Xml\DataSetMappper.cs (1)
47foreach (DataTable t in _dataSet.Tables)
System\Xml\XmlDataDocument.cs (12)
196if (_dataSet.Tables.Count > 0) 275_dataSet.Tables.CollectionChanging += new CollectionChangeEventHandler(OnDataSetTablesChanging); 283if (_dataSet.Tables.Count > 0) 285foreach (DataTable t in _dataSet.Tables) 3044if (ds == null || ds.Tables.Count == 0) 3050retValue = new DataTable[ds.Tables.Count]; 3051ds.Tables.CopyTo(retValue, 0); 3058retValue = new DataTable[ds!.Tables.Count]; 3061foreach (DataTable dt in ds.Tables) 3071foreach (DataTable dt in ds.Tables) 3092ds.Tables.CopyTo(retValue, 0); 3141foreach (DataTable dt in ds.Tables)
System.Data.Odbc (16)
src\libraries\Common\src\System\Data\ProviderBase\DbMetaDataFactory.cs (5)
60DataTable? sourceTable = _metaDataCollectionsDataSet.Tables[collectionName]; 106DataTable metaDataCollectionsTable = _metaDataCollectionsDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections]!; 229DataTable? metaDataCollectionsTable = _metaDataCollectionsDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections]; 349restrictionsTable = _metaDataCollectionsDataSet.Tables[DbMetaDataCollectionNames.Restrictions]; 392DataTable metaDataCollectionsTable = _metaDataCollectionsDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections]!;
System\Data\Odbc\OdbcMetaDataFactory.cs (11)
52DataTable? metaDataCollectionsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections]; 62DataTable? restrictionsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.Restrictions]; 127CollectionDataSet.Tables.Remove(CollectionDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections]!); 128CollectionDataSet.Tables.Add(metaDataCollectionsTable); 132CollectionDataSet.Tables.Remove(CollectionDataSet.Tables[DbMetaDataCollectionNames.Restrictions]!); 133CollectionDataSet.Tables.Add(restrictionsTable); 568DataTable? dataSourceInformationTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.DataSourceInformation]; 788DataTable? dataTypesTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.DataTypes]; 970DataTable? reservedWordsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.ReservedWords];