Oystein Fledsberg wrote:
> I'm trying to have an install program automatically create the DSN for
> my MySQL database. I'm using the SQLConfigDataSource function, but it won't
> set all the values. Only the DSN label and the database name is set, even
> though I include a SERVER=localhost in the call.
> Has anybody done this successfully? Any example code?
unixODBC ( http://www.genix.net/unixODBC ) includes an odbcinst lib. It is
basically used to read/write ODBC system information as per the MS spec. You
will also find a command line interface for this as well. The command line
tool has been created specifically to allow install script/RPM writers to
update odbcinst.ini and odbc.ini during install. It takes a given ini file and
attempts to update the given target... like a merge.
I understand that someone has made the existing MySQL driver work with
unixODBC but perhaps someone else can comment on this?