• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 945
  • Last Modified:

Manually installing SQL Server ODBC driver

Is there an API call which will register the SQL Server driver (SQLSRV32.DLL) with ODBC?  If an API call exists, I would assume that it would take care of making the entries in the following registry locations: "HKLM\Software\ODBC\ODBCINST.INI\ODBC Drivers" and "HKLM\Software\ODBC\ODBCINST.INI\SQL Server".  I'm hoping that there is an API call out there called RegisterNewODBCDriver or something like that.

Right now my installation program copies all of the files needed by the SQL Server ODBC driver and it manually creates the registry entries.  This works fine, but I would prefer to call an API function to take care of the registry if possible.  I do NOT want to install the full blown MDAC in this situation, I am only interested in installing and registering the SQL Server driver with ODBC.

Thanks.
0
jsullivan
Asked:
jsullivan
1 Solution
 
wqwCommented:
hmmm, never heard of one actually. will be helpfull indeed.

</wqw>

p.s. i'm particularly interested. nevermind my comment :-))
0
 
tchalkovCommented:
Generally this depends on the version of ODBC you are using. If you are using 3.0 or higher then use the function SQLInstallDriverEx. It is described in MSDN. You don't need anything else.

However if you are using ODBC 2.5 then you must use SQLInstallDriver, and you need an .inf file which describes your driver.
The problem is that SQLInstallDriver is not supported under ODBC 3.0 and higher, so you'll have to know which ODBC version you will support.

Here are a few KB articles which you may find usefull : Q168052, Q158615
0
 
jsullivanAuthor Commented:
tchalkov,

Thanks, that was exactly what I needed.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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