Sql-server – Connect to SQL Server using OLEDB or ODBC

odbcoledbsql serversql-server-2008-r2windows

We have a desktop application written in Visual Basic .NET. One our clients needs to use ODBC instead of OLEDB to connect to the SQL Server 2008 R2 Database. The company has several databases including Oracle, IBM DB2, and PostgreSQL.

We can migrate the connections, but we need to know what is the better: OLEDB or ODBC when connecting to SQL Server 2008 R2?

Best Answer

For most applications hitting SQL Server 2008 R2, you would be fine going either way, I think.

OLEDB support is being removed after SQL Server 2012 but until it is, you'd likely be fine either way based on your standards and your needs. That said, I'd look to future supportability and consider going ODBC with the Native Client.

I would say a more important decisions would be to consider using the Native Client for your .net apps if you aren't already.