Solved

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

Posted on 2015-02-10
5
165 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
ID: 40602014
0
 
LVL 14

Author Comment

by:Bill Ross
ID: 40602324
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
ID: 40602518
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
ID: 40602802
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
ID: 40602844
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can i Import Access Table Into Oracle Using Toad 36 166
Combobox row source 2 19
Access Open Report with SQL Parameter 11 28
Dirty form - conditional formatting 5 10
The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

813 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

12 Experts available now in Live!

Get 1:1 Help Now