ASP + Original Author: share rain
ADO + introduced a DataSet and DataView concept. The DataSet is similar to the record set collection, because it can save one or more data and the relationship between the table (table ). A dataview is these tables, one of the implementation, similar to ADO recordset. In the example above, we DataSet to keep only a table: Upcoming, we're going to the resides ASP + in a server control. Can be one of the following ways to in the DataSet to add more tables.
* Re-define our SQL statement.
* Adodatacommand of selectcommand property is set to a new adodatacommand
* Call adodatacommand of filldataset Method
Filldataset method SQL query results to the table in the deposit to be passed to the method calls in the DataSet. Add another table will be led to the following changes:
Dscupcoming = New adodatasetcommand (strsql, Connect. connecttodb ())
Dscupcoming. filldataset (dsupcoming, "the Upcoming ")
"Re-defined SQL statement
Strsql = "" SELECT * FROM Students"
'Setting adodatasetcommand of selectcommand Properties
Dscupcoming. selectcommand = New adocommand (strsql, Connect. connecttodb ())
Using filldataset method, the results as a new watch added to A Dataset
Dscupcoming. filldataset (dsupcoming, "Students ")
Now we have already established the connection to the database and to return data in the DataSet, but we didn't use this data.