Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

How will i come to know - that wether my 32 bit application(c++) is using SQL native client 2005 drivers or SQL native client 2008 drivers to connect to SQL server?


In the connection string it has been mentioned that <b>Provider=SQLNCLI10.1;</b> , by which i understand sql nativeclient 2008 is used.

I have problem that, my application crashes when sql native client 2005 is not installed. Because it tries to load sqlncli.dll and crashes if its not there.
Works well with SQL client 2005. My application need to upgrade to SQL serve 2008, hence the problem.


How will i know - that wether my 32 bit application(c++) is using SQL native client 2005 drivers or SQL native client 2008 drivers to connect to SQL server?

Any thoghts on this would be of great help.
Posted

1 solution

You might able to catch the system exception which is causing the crash.

However it might just be better if you wrote code that actually looked for the required dll(s). You can either just do a file search, or probably better try to load the dll yourself (unload it also if you find it.) You need only do that when the application starts.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900