Apache OpenOffice (AOO) Bugzilla – Issue 1513
"organize ODBC" for UNIX (was: Error while connecting to the data source sdbc:odbc:test)
Last modified: 2006-05-31 14:29:06 UTC
If I have a database, for which I supply the wrong password in the Data Sources dialog, I get an error message from the ODBC manager telling me that I have supplied the wrong user name and password. This is normal and proves that OO is trying to establish a connection. If I supply the right password I get this error message when I try to access the tables of the database: "Error while connecting to the data source" "A connection could not be established for URL sdbc:odbc:test" This is not very specific ... I also tried to do an strace but I'm not sure what I'm looking for since the connection itself seems to work correctly. There is one problem though. I click "Organize" in the database selection dialog and I get an error telling me that libodbc.so can't be loaded or is corrupted. An strace says this. It looks ok to me: open("/usr/local/lib/libodbc.so", O_RDONLY) = 32 fstat(32, {st_mode=S_IFREG|0755, st_size=1012513, ...}) = 0 read(32, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20f\0\000"..., 4096) = 4096 mmap(0, 348320, PROT_READ|PROT_EXEC, MAP_PRIVATE, 32, 0) = 0x46654000 mprotect(0x466a7000, 8352, PROT_NONE) = 0 mmap(0x466a7000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 32, 0x52000) = 0x466a7000 close(32) At least, the library can be loaded. I am using unixODBC-1.8.12, MyODBC-2.50.34 and OO632. libodbc.so is version 1.0.0. MyODBC-2.50.37 doesn't work better.
Hi Conny, For the "error connecting ..." dialog: Is there a "details" button in the error dialog? If so, are there more informations in the dialog invoked when you pres it? (Sounds weird, but sometimes the addtional dialog does not really tell you any news – it's not a feature, it's a bug.) For the "organize" problem: I had a look at the code ... the truth is, under non-windows systems, the organize button is avaiable and enabled, and upon clicking it, the error message you described appears (and the button is disabled then). I'll fix this ... > I am using unixODBC-1.8.12, MyODBC-2.50.37 and OO632. > libodbc.so is version 1.0.0 AFAIK, the driver manager of unixODBC is somewhat buggy (with respect to passing arguments it gets to the drivers and such). Usually, our reference is iODBC, as is supports ODBC 3.0 (which is required for OOo). Would you mind trying iODBC instead of uniODBC? One more thing: I saw that iODBC has a libiodbcinst.so (which should be linked as libodbcinst.so I assume), which contains the SQLManageDataSources function needed for the "Organize". So instead of disabling the Organize completely for Linux (as we did, e.g., in SO 5.2), we may have a chance to really enabling it. Do you know if you unixODBC (can't test it myself right now, as I don't have it at hand) has a libodbcinst.so as well (or something similar)? If so, could you do a "nm libodbcinst.so" to check whether or not they have the SQLManageDataSoures symbol?
accepting this for the part with the organize button. Will have a look at the error message after this.
changing the summary for easier recognition
adding "needhelp" keyword - perhaps external developers do want to have a look at this?
Ocke, can you please have a look at this, and evaluate if we can enable the Organize button for Unix, too?
I'll have a look at it.
Hi, we want fix this bug. The problem here is that we unixODBC wants a QT widget handle which we don't have in some cases and we can not know that the OdbcManager is unixODBC which only accepts this QT widget as said before. I don't know if other odbc driver managers uses the same handle, which I don't believe. In this cases we risk a crash which we won't. Best regards, Ocke
closing
change subcomponent to 'none'