[unixODBC-support] Issue in adding system DSN
Srinivasan
tsrini_it at yahoo.co.in
Tue Nov 17 12:16:58 GMT 2009
Hi,
I am trying to create system DSN in my C++ application (in linux) by linking 'libodbcinst.a' statically. Here is the syntax which I used to create the DSN,
SQLConfigDataSource(NULL, ODBC_ADD_SYS_DSN, "MySQL", "DSN=xxxxxx\0UID=xxxx\0PWD=xxxxx\0Description=xxxxxxx\0Database=xxxxxx\0Server=xxxx\0Port=xxxxxx\0\0");
While doing this, instead of creating the system DSN in /usr/local/etc/odbc..ini file, it creates user DSN in /root/.odbc.ini file (running my application as root user).
If the same code is linked with 'libodbcinst.so' file, it works & system DSN is created in /usr/local/etc/odbc.ini. Also, exporting the environment variable ODBCSYSINI in my application doesn't help.
Am I missing anything.
Regards,
Srini
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20091117/a47ee349/attachment.html>
More information about the unixODBC-support
mailing list