Solved

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

Posted on 2016-08-04
11
89 Views
Last Modified: 2016-08-11
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...
0
Comment
Question by:dougfosterNYC
  • 5
  • 3
  • 2
  • +1
11 Comments
 

Author Comment

by:dougfosterNYC
ID: 41742553
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...
0
 
LVL 24

Assisted Solution

by:Bitsqueezer
Bitsqueezer earned 125 total points
ID: 41743690
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
0
 
LVL 68

Accepted Solution

by:
Qlemo earned 250 total points
ID: 41743762
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.
0
 
LVL 46

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 125 total points
ID: 41743981
SQLNCLI is deprecated since MSSQL 2014. MSSQL ODBC 11 should be used instead.
0
 
LVL 68

Expert Comment

by:Qlemo
ID: 41744059
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".
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 46

Expert Comment

by:Vitor Montalvão
ID: 41744093
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.
0
 

Author Comment

by:dougfosterNYC
ID: 41744145
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)....
0
 

Author Comment

by:dougfosterNYC
ID: 41745478
excellent conversation
0
 
LVL 46

Expert Comment

by:Vitor Montalvão
ID: 41751916
Doug, I'm not sure if you're expecting any comment from our part or you're done with this question.
0
 

Author Comment

by:dougfosterNYC
ID: 41751944
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.
0
 

Author Closing Comment

by:dougfosterNYC
ID: 41751950
thanks, excellent help.  Sorry i didn't close this out before... I tried but didn't see this portion of the process...
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now