Mapping .NET Data Provider Types to .NET Framework Types

ADO.NET disconnected classes are data-source independent. When data is retrieved from a data source into the .NET objects, the data is stored as .NET Framework types rather than data types specific to the data source. When data is retrieved, either by using the Fill( ) method of the DataAdapter or the GetValue( ) method of the DataReader, the .NET Framework type is inferred from the type returned from the .NET data provider. When specifying the data type for a column, a .NET Framework type compatible with the data type in the underlying data source must be specified. Appendix A lists the .NET Framework Types corresponding to Microsoft SQL Server types and OLE DB types.

Get ADO.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.