vba ado provider to sql server -- ole and native client

i haven't tested the performance recently.. but I want to throw this question out there to get perspective.

I have an Excel/vba app that runs reports off of a sql server warehouse in a corporate environment, using windows authentication.  

I'm using an ADO connection to the db, and have alternated between using the OLE (SQLOLEDB) and the native client (SQLNCLI10) provider.

It's worked fine with both providers for 6 years, and I haven't noticed a significant performance difference, although I haven't been scientific in benchmarking them.

But now some people have been upgraded from version 10 to version 11, and now it doesn't work for them, since it is version specific.  

That will be a pain to maintain, and I'll have to come up with a creative way to try more than one and turn off  On Error.  

I know that OLE has been depreciated, but it seems to me it has the significant advantage of not being version specific in the connection string.

Is there a way to use the native client that is not version specific?  And is it truly better than using OLE?  When will OLE be phased out?

Thanks...
dougfosterNYCAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dougfosterNYCAuthor Commented:
Oh, and we are migrating to a new server environment.  So the legacy is sql server 2008, and the new one is version 2012.  I'm not sure if that is going to make any difference...
BitsqueezerCommented:
Hi,

the SQLOLEDB driver is a more "common" driver, the SQLNCLI driver supports more specific features of each version of SQL Server. I would say, if you do not use specific new datatypes of newer SQL Server versions you will not have a problem using SQLOLEDB. SQLNCLI supports ways of downloading data faster than other drivers but as far as I know that is not the case if it is used by ADO, but here I'm not completely sure.

I would always prefer to use SQLNCLI if possible, the only case when I'm forced to use SQLOLEDB is for recordsets to be assigned to an Access form to keep it updatable. In any other case I use SQLNCLI.

Details about connection strings for SQLNCLI you can find here:
http://www.connectionstrings.com/sql-server/

But there is no "upgrade" in case of SQLNCLI: All versions can be installed at the same time (I use SQLNCLI for SQL Server 2005 and 2008 in parallel on the clients), so you can use any version you want on the same machine. If you plan to use a newer SQL Server, why not let all clients install the SQLNCLI11 driver and update your connection string?

Cheers,

Christian
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
SqlNCli increases overall speed. If it is significant and worth the version-dependant connection string hassle is a question of the environment. Sadly there is indeed no way to always use the newest available and installed Native Client, you need to provide the release (10 or 11), and exactly that driver has to be installed.

We are currently switching from OleDB to SqlNCli on a broad base for our customers, and I've implemented a registry check to switch to OleDB if the Native Driver is not installed, by manipulating the connection string.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

Vitor MontalvãoMSSQL Senior EngineerCommented:
SQLNCLI is deprecated since MSSQL 2014. MSSQL ODBC 11 should be used instead.
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
MS is leaning towards ODBC 11. OLE DB is "depricated", not the Native Client - there will be no newer release than 2012 for it, but I wouldn't tell that "depricated".
Vitor MontalvãoMSSQL Senior EngineerCommented:
Avoiding to make a dissertation of the "deprecated" meaning but want I wanted to state is to avoid using Native Client for MSSQL 2014 or superior. Newer versions of MSSQL ODBC has been released so don't stick with SNAC 2012 if you want to work with last SQL Server versions.
dougfosterNYCAuthor Commented:
Thanks all for your comments.  It looks like there is no clarity on this issue, but for now, there is no pressing reason to drop OLE.  But i think I'll add logic to find the newest version of the native client... i'm hoping that IT is rolling it out for all of us so we'll all be on version 11 soon....  

The reason i can't have users upgrade is because i work at a large company and our environments are completely dictated by IT.  We can't install anything on our machines (many of which are virtual)....
dougfosterNYCAuthor Commented:
excellent conversation
Vitor MontalvãoMSSQL Senior EngineerCommented:
Doug, I'm not sure if you're expecting any comment from our part or you're done with this question.
dougfosterNYCAuthor Commented:
Ok, thanks.  I thought i closed this out but clearly it didn't take. I'm not sure what happened... I'll do it again.
dougfosterNYCAuthor Commented:
thanks, excellent help.  Sorry i didn't close this out before... I tried but didn't see this portion of the process...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VBA

From novice to tech pro — start learning today.