You want to convert between .NET provider data types and .NET Framework data types.
You need to understand the .NET Framework data types; their mappings
to SQL Server, OLE DB, ODBC, and Oracle data types; and how to
properly cast them. The .NET Framework typed accessors and .NET
Framework provider-specific typed accessors for use with the
DataReader class are also important.
DataSet and contained objects are data
source independent. The
DataAdapter is used to
retrieve data into the
DataSet and to reconcile
modifications made to the data to the data source at some later time.
The implication is that data in the
objects contained in the
DataSet are .NET
Framework data types rather than data types specific to the
underlying data source or the .NET data provider used to connect to
that data source.
DataReader object for a data source is
specific to the .NET data provider used to retrieve the data, the
values in the
DataReader are stored in variables
with .NET Framework data types.
The .NET Framework data type is inferred from the .NET data provider
used to fill the
DataSet or build the
DataReader has typed accessor methods that improve performance by returning a value as a specific .NET Framework data type when the data type is known, thereby eliminating the need for additional type conversion. For more information about using typed accessors ...