[unixODBC-support] Odbc.ini

Nick Gorham nick at lurcher.org
Fri Sep 11 18:33:25 BST 2009

Tran Hung-Phu-R50825 wrote:
> Currently I am having problem with unixODBC truncates the odbc.ini,
> To prevent it, I've changed the ini file permission to read-only so that
> the Driver Manger won't empty the ini file. I am 
> wonder what will happen to the connection if the unixodbc Driver
> Manager try to overwrite the ini file and failed.  Will the
> connection still exist?  If yes, How about DSN from the ini file? Will
> they be available or empty? If no, is there a variable setting such as
> ConnectionRetryCount that I can use in .ini file to force retry
> connection
> to database a couple of times before quit.
> Is there any variable/debug setting I can use to dump error message when
> it failed?
> OS: solaris 10
> Database: Mysql 5
> UnixODBC: 2.2.14
> Thanks for your help.
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at mailman.unixodbc.org
> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Ok, I have changed the "w" open mode in iniOpen.c to "w+" I can't see 
any down side, and it should prevent truncating the file. There is a 
bunch of reasons fopen could fail that does not require the file to not 

2.2.15pre on the ftp site has this change if you want to try it.


More information about the unixODBC-support mailing list