System.Data.Odbc 9.0.0-preview.3.24172.9
About
This package implements a data provider for ODBC data sources.
Key Features
Allows access to ODBC data sources.
How to Use
This is a basic example of retrieving the results of a query using an OdbcDataReader. For examples of using an OdbcDataAdapter, and of updating an ODBC data source, please see the documentation.
using System.Data.Odbc;
string connectionString = ""; // Fill in
string queryString = "SELECT DISTINCT CustomerID FROM Orders";
using OdbcConnection connection = new OdbcConnection(connectionString);
using OdbcCommand command = new OdbcCommand(queryString, connection);
connection.Open();
using OdbcDataReader reader = command.ExecuteReader();
while (reader.Read())
{
Console.WriteLine("CustomerID={0}", reader[0]);
}
Main Types
- OdbcConnection represents a connection to an ODBC data source.
- OdbcCommand represents an SQL statement or stored procedure to execute against an ODBC data source..
- OdbcDataReader provides a way of reading a forward-only stream of data rows from an ODBC data source.
- OdbcDataAdapter represents a set of data commands and a database connection that are used to fill a DataSet and update the ODBC data source.
Additional Documentation
Related Packages
System.Data.OleDb is a similar package for accessing OLE DB data sources.
Feedback & Contributing
System.Data.Odbc is released as open source under the MIT license. Bug reports are welcome at the GitHub repository. This package is considered complete and we only consider low-risk, high-impact fixes that are necessary to maintain or improve quality.
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- No dependencies.
.NET 8.0
- System.Text.Encoding.CodePages (>= 9.0.0-preview.3.24172.9)
.NET 9.0
- System.Text.Encoding.CodePages (>= 9.0.0-preview.3.24172.9)
.NET Standard 2.0
- No dependencies.