Le dimanche 01 janvier 2006 à 11:35 -0500, SOTL a écrit : Hi,
> Oh thanks for the copy of "How-to Configure ODBC on Linux with MySQL and > OpenOffice.org 1.1.x. Good, it also explains how to get it working for OOo 2.x, I might have to correct the title ;-) > /etc/odbcinst.ini contains the following: > ---------- > [PostgreSQL] > Description = ODBC for PostgreSQL > Driver = /usr/lib/libodbcpsql.so.2 > Setup = /usr/lib/libodbcpsqlS.so.1 > FileUsage = 1 > > [MySQL] > Description = ODBC for MySQL > Driver = /usr/lib/libodbc.so > Setup = /usr/lib/libodbc.so > FileUsage = 1 > You don't need the above two entries (unless you want to access a postgresql db via ODBC). You should be able to simply delete this first MySQL entry, especially since the setup line points to the wrong file. Delete all of these above first MySQL entries. > [MySQL ODBC 3.51 Driver] > Description = ODBC for MySQL > DRIVER = /usr/lib/libmyodbc3S.so > SETUP = /usr/lib/libmyodbc3S.so > FileUsage = 1 > There is an error in your DRIVER line entry. It shouldn't read libmyodbc3S.so, but something like libmyodbc3-3.51.11.so or libmyodbc3-3.51.12.so (latest driver version available). The libmyodbc3S file is the library used for configuration, i.e. the one that gets called when you try to add a new DSN. This is what is shown in my How-to document. > /etc/odbc.ini contains the following: > ---------- > [MySQL-test] > Description = MySQL database test > Driver = MySQL > Server = localhost > Database = test > Port = 3306 > Socket = > Option = > Stmt = > > [MySQL-testdb] > Description = MySQL database testdb > Driver = MySQL > Server = localhost > Database = testdb > Port = 3306 > Socket = > Option = > Stmt = > Your Driver line points to the wrong driver. Replace Driver = MySQL with Driver = MySQL ODBC 3.51 Driver > I highlighted MySQL and clicked OK. > I got an error message: > Could not construct a property list for MySQL > This is normal because you have indicated the libmyodbc3S file instead of libmyodbc3-3.51.11.so. So the program looks for a routine in the 3S file that it can't find and then throws an error. > Got Error Message:: > Error while connecting to source > [unixODBC][Driver Manager] Driver' SQLAllocation Handler on SQL_HANDLER_HENV > failed > Normal. Once again, your odbcisnt.ini file points to the wrong library file (the 3S one that you copied into both lines Driver and Setup) so no connection can be established. > Went back to Graphics Configuration of ODBC using ODBCConfig and revisited > 'System DSN' 'Select the Driver to use or Add a new one' and reselected MySQL > and clicked OK. > Graphic Configuration window closed. > I did not get the window that described the MySQL driver either time. Normal again, the second attempt causes the configuration utility to crash. Correct your odbcinst.ini file in the way I have indicated here and as it is shown in my How-to. It is very important that you understand the distinction between : - the libmyodbc3-3.51.blah.blah file, which contains the functions and routines used to establish connections with the mysql server via ODBC - the libmyodbc3S file, which contains the functions and routines used to pass options for setting up the connection. The first one is the DRIVER The second one is the SETUP Alex --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
