Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to register ODBC driver?

I have created a inventory system for my school project and I use SqlLite as standalone DB. I am able to run it as long as I install the SqlLite ODBC connection (separate installer).

But what I want is to create an installer and install the SqlLite ODBC Drivers along with my porject in one installer instead of of running two separate installer (my application and sqlLite ODBC driver installer).

Any idea how to do it? Or do you have any recommendation?

What I have done so far. I copy the SQLLite ODBC dll into my application folder and run it but an error shows telling that no ODBC driver installed. I failed to register the SqlLite odbc dll on both 32 and 64 bit windows OS.

like image 714
Edang Jeorlie Avatar asked Dec 01 '22 19:12

Edang Jeorlie


1 Answers

You can use the odbcconf command to register the driver dll directly. Note there're both 32 bit and 64 bit ODBC drivers, so you will need to use the respective odbcconf command.

For example to install 64 bit ODBC driver on 64 bit machine:

odbcconf /A {INSTALLDRIVER "My Driver Name|driver=Path to my driver dll"}

To install the 32 bit driver on 64 bit machine:

%systemroot%/systemwow64/odbcconf /A {INSTALLDRIVER "My Driver Name|driver=Path to my driver dll"}

You can find more about the odbcconf command at Microsoft Docs

like image 177
Hainan Zhao Avatar answered Dec 04 '22 07:12

Hainan Zhao