Currently I can connect to a local .mdb with an Oledb connection. I am able to query, add, update and delete the database with correct results.
How would connecting to an ODBC database differ in terms of c# usage from an Oledb database?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The connection would likely only differ in connection string (and possibly setting up an ODBC connection in Control Panel), but the .NET classes for connection all implement IDbConnection/Command/Transaction etc so are very similar. In C# you have OleDbConnection and OdbcConnection, I believe – but again both implement the base interfaces.
A short overview can be found here:
http://database.ittoolbox.com/documents/odbc-vs-oledb-18150
Most database vendors support ODBC as it was designed to be a sort of shared connection mechanism, but again most vendors supply or prefer another (Oracle ADO.NET Provider, MySQL Provider, etc).
Either go generic, or if its only a small application, go for the one most suited to the target database.