ODBC DataSet Drill Down

Drill into the DataSet XSD

In the last installment we created a new ODBC dataset. In this article we will drill under the covers of the XSD to see what makes up the dataset. In earlier .NET data access techniques a Connection object represented the server and database that would be accessed, and a Command object could be created that used that connection to execute the desired SQL statement. The Command object could be used directly to read a data stream that was referenced using a DataReader object,

f1

or a set of Command objects could be embedded in a DataAdapter object that was able to Fill a DataTable from an intermittent Connection.

f2

When we look at the XSD structure that is created for the DataSet, it first looks quite different, but as we drill deeper into the code we find a slightly different adapter, the database table specific TableAdapter.

f3

When we look further inside the TableAdapter we find the DataAdapter once again, along with the Connection object and collection of Command objects.

f4

As the TableAdapter is initialized, the embedded DataAdapter is as well.

f5

When asked to fill its dedicated table, the Table adapter calls upon the embedded DataAdapter to do the heavy lifting.

f6

So while the DataSet creation is a great improvement on coding data access by hand, it continues to use the familiar data access objects behind the scenes.