Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 415
  • Last Modified:

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

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
Bill Ross
Asked:
Bill Ross
  • 2
  • 2
1 Solution
 
pcelbaCommented:
0
 
Bill RossAuthor Commented:
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
 
OnisanCommented:
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
 
pcelbaCommented:
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
 
Bill RossAuthor Commented:
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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now