Solved

Can I use VBA to determine the SQL Native Client version?

Posted on 2015-02-10
5
128 Views
Last Modified: 2015-02-11
Some computers have SQL Native Client 10.0 others have  11.0.  Can I determine which version is installed via code?  If so I can adjust the connection string.  Thanks..
0
Comment
Question by:Bill Ross
  • 2
  • 2
5 Comments
 
LVL 41

Accepted Solution

by:
pcelba earned 500 total points
Comment Utility
0
 
LVL 14

Author Comment

by:Bill Ross
Comment Utility
Do you know of a good fast test to see if the connection works.  I seem to run into a long wait if the wrong driver is tested.
0
 
LVL 3

Expert Comment

by:Onisan
Comment Utility
If you can connect to it there are two ways I know of.
Run a Select query:     SELECT @@VERSION as 'SQL Server Version'
Call the stored procedure  xp_msver
0
 
LVL 41

Expert Comment

by:pcelba
Comment Utility
You should be able to set connection timeout before the connection is established. But if the delay is problem then you should read the list of available ODBC drivers from Windows Registry as showed in links from my previous post.
0
 
LVL 14

Author Closing Comment

by:Bill Ross
Comment Utility
Hi,

I ended up using a test to determine which driver was installed using the code from vbforums.  Thanks for pointing me in the right direction.

Bill
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
This collection of functions covers all the normal rounding methods of just about any numeric value.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…

772 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

16 Experts available now in Live!

Get 1:1 Help Now