Bug 88591 - CONNECTING: ODBC Wants SQLite2, Cannot Connect to SQLite3 .db
Summary: CONNECTING: ODBC Wants SQLite2, Cannot Connect to SQLite3 .db
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Linux (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-19 16:18 UTC by Rich Shepard
Modified: 2015-01-19 18:38 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rich Shepard 2015-01-19 16:18:36 UTC
Versions: LO-4.3.5, SQLite-3.8.8, unixODBC-2.3.2, sqliteodbc-0.9991 on Slackware-14.1.

Base recognized .db when initially connecting and created a .odb. When I tried opening the .odb to view tables or create forms Base complained that it could not connect to the database because:

"The connection to the data source 'NewDatabase' could not be established.
[unixODBC][Driver Manager] can't open lib '/usr/local/lib/libsqliteodbc.so':
file not found."

The correct library name is libsqlite3odbc.so and it's found in /usr/local/lib.

The genaral mail list was not able to provide a solution to this issue. If there is an existing way to let Base know the correct library name the community does not know this and I'd appreciate learning it so you can close this issue.

Rich
Comment 1 Alex Thurgood 2015-01-19 16:31:44 UTC
See bug 82688 for a hint that connections to sqlite3 dbs actually work via ODBC, in particular with libsqliteodbc 0.992-2 on Debain.

The issue you are having may be specific to your OS and libsqliteodbc version.

From memory, an ODBC connection from Base to libsqlite3 db works for me on Linux Mint 17
Comment 2 Lionel Elie Mamane 2015-01-19 18:22:07 UTC
How is that a bug of LibreOffice?

At most, it would be a bug in the ODBC driver. However, sqliteodbc actually provides two drivers, one for SQLite2 and one for SQLite3. For example, on a Debian system /etc/odbcinst.ini contains:

[SQLite]
Description=SQLite ODBC Driver
Driver=libsqliteodbc.so
Setup=libsqliteodbc.so
UsageCount=1

[SQLite3]
Description=SQLite3 ODBC Driver
Driver=libsqlite3odbc.so
Setup=libsqlite3odbc.so
UsageCount=1


I suggest you double check that your ODBC data source is configured with the correct driver (that is a reference to the right entry in /etc/odbcinst.ini). Probably your odbc data source (in ~/.odbc.ini or /etc/odbc.ini) needs

Driver          = SQLite3

instead of

Driver          = SQLite
Comment 3 Rich Shepard 2015-01-19 18:38:47 UTC
Alex/Lionel:

  Your points are valid.

  I rebuilt unixODBC to include the GUI, but there's no ODBCConfig on my system.

  There was no unixODBC.ini in /etc/ so I created one for sqlite3 using the debian one as the source. Also, in /etc/odbc.ini and /etc/odbcinst.ini I did have the sqlite2 libraries; those have been changed to specify sqlite3. Totally my error.

  LO Base apparently does not recognize the changes. But, rather than telling me it cannot make a connection because the library is missing I'm told the connection cannot be established because the DSN is not found and a driver name is not specified. Found no menu item to fix these, so I'll delete the .odb and start over.

  This is obviously a configuration issue and not a bug so please close this issue.

Thank you both,

Rich