|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Calculated columns that refer to relationships
|
Total Hit (2988) |
The DataSet is a container of multiple DataTables, and it allows to create parent-child relationships between two tables, as shown below:
«Code LangId=2»
' create a relationship between the Categories and the Products tables,
' against the CatID column
ds.Relations.Add(New DataRelation("CatPr
....Read More |
Rating
|
|
|
Close the DataReader before changing database
|
Total Hit (2754) |
The ChangeDatabase method of the ADO.NET Connection object requires an open connection to execute correctly. Even if the connection is open, you can still have an InvalidOperationException when invoking this method; this happens when you are reading data from the connection by means of a DataReader
....Read More |
Rating
|
|
|
Determine how many records the DataReader is about to return
|
Total Hit (2775) |
The DataReader is the ADO.NET counterpart of the forward-only, read-only recordset in classic ADO. For this reason you never know how many rows the DataReader is about to return. In most cases you don't need this information, because you tipically process each row as soon as it is being returned, an
....Read More |
Rating
|
|
|
Determine how many records the DataReader is about to return
|
Total Hit (3004) |
The DataReader is the ADO.NET counterpart of the forward-only, read-only recordset in classic ADO. For this reason you never know how many rows the DataReader is about to return. In most cases you don't need this information, because you tipically process each row as soon as it is being returned, an
....Read More |
Rating
|
|
|
Include schema information in a DataSet's DiffGram
|
Total Hit (2895) |
In the .NET Framework, the DataSet's WriteXml method when used to create a DiffGram does not provide the capability to include schema information along with the data. This is more of a design choice than an objective difficulty, though. When you return a DataSet object from a Web service method your
....Read More |
Rating
|
|
|
MDAC 2.6 is required for .NET applications
|
Total Hit (2775) |
All ADO.NET applications require MDAC 2.6 or later (MDAC 2.7 is recommended). MDAC 2.7 comes with Visual Studio .NET but no MDAC version is included in the Microsoft .NET Framework SDK and the .NET Framework redistributable package. If your .NET application attempts to open a connection without a va
....Read More |
Rating
|
|
|
Persist ADO.NET extended properties
|
Total Hit (3842) |
Many ADO.NET classes, including DataSet, DataTable, and DataColumn, use the ExtendedProperties property to enable users to add custom information. Think of the ExtendedProperties property as a kind of generic cargo variable similar to the Tag property of many ActiveX controls. You populate it with n
....Read More |
Rating
|
|
|
The DataTable's Compute method
|
Total Hit (3137) |
The DataTable class has a method, Compute, that executes SQL-like functions on the rows locally stored in the DataTable. It supports functions such as COUNT, SUM, MIN, MAX, AVG and others. Here's an example to calculate the average salary for the employees stored in the tableEmployees DataTable:
....Read More |
Rating
|
|
|
|