Implementing ODBC in ASP .NET

The Problem

Anybody who has ever connected a web page to a simple database is probably familiar with Microsoft’s Open Database Connectivity (ODBC) interface. This is the interface that enables a developer to assign a Data Source Name (DSN) to the database, and then interact with it in a consistent fashion regardless of the specific flavor of database behind the DSN.

In combination with Microsoft’s Active Server Pages (ASP), ODBC became a very popular technology, because it’s very simple to use and it works. In fact, if you are developing in a shared hosting environment and are not paying a premium for access to a SQL or Oracle server, then ODBC may well be your only reasonable option.

Enter ASP .NET. When Microsoft folded ASP .NET into its high-end development environment, Visual Studio .NET, they did not include native support for ODBC. Why not? Because Microsoft has a new technology, called OLE DB, that is supposed to replace ODBC. As a result, the data server controls that ship with Visual Studio .NET support OLE DB and database server environments such as SQL Server, but not ODBC.

You might also like...

Comments

About the author

Jason G. Williscroft

Jason G. Williscroft United States

Jason Williscroft is a former Marine and naval officer, and a graduate of the United States Naval Academy, where he studied Systems Engineering. He is currently General Manager of HotQuant, LLC,...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Engineers are all basically high-functioning autistics who have no idea how normal people do stuff.” - Cory Doctorow