[SOLVED] LO Base Can't Connect to Sqlite3

Below are the steps I have taken to get Sqlite3 hooked up to Base. I don’t know what to do to fix this>

Blockquote
USING: Libre Office Version: 6.0.7.3
Build ID: 1:6.0.7-0ubuntu0.18.04.10

SITE: https://thejeshgn.com/2018/08/23/using- … l-UnixODBC

COMMAND: sudo apt-get install sqlite3 libsqlite3-dev.

RESULT: Sqlite3 runs fine.

COMMAND: ./configure && make ( as per instructions in SITE)
rick@rick-Latitude-E6510:~/Desktop/sqlite-driver/sqliteodbc-0.9996$ ./configure && make

RESULT:
checking build system type… x86_64-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
.
.
.
checking for sqlite3_table_column_metadata in -lsqlite3… no
checking for sqlite3_profile in -lsqlite3… no
checking for sqlite3_strnicmp in -lsqlite3… no
checking for sqlite3_close_v2 in -lsqlite3… no
checking for SQLite4 header and library… no
configure: WARNING: SQLite4 header file and source not found
configure: error: No usable SQLite header/library on this system
rick@rick-Latitude-E6510:~/Desktop/sqlite-driver/sqliteodbc-0.9996$

COMMAND: make install ( as per instructions in SITE)
rick@rick-Latitude-E6510:~/Desktop/sqlite-driver/sqliteodbc-0.9996$ make install

RESULT:
make: *** No rule to make target ‘install’. Stop.
rick@rick-Latitude-E6510:~/Desktop/sqlite-driver/sqliteodbc-0.9996$

Please note that you should always provide links to same question posted in other forums. This eliminates duplicate effort.

Also posted here → Can't get Sqlite3 driver (View topic) • Apache OpenOffice Community Forum

@kasloman,

Please do not mark question titles as [SOLVED]. On this site it is more appropriate to click on the :heavy_check_mark: in upper left area of answer which satisfied the question. This signifies an accepted answer.

Hello,

Have not touched SQLite in some time. In past only did so for answering questions on this site.

You should be able to get the unixodbc and libsqliteodbc drivers using Synaptic or see this post → Setting up ODBC for SQLite on Ubuntu.

Additional information can be found in my answers here:

If you continue to have problems, will attempt to once again install on my system. Have Ubuntu 18.04 Mate with LO v6.3.3.2

By using a closed question I got a little further! I get to where ‘Base’ wants to connect to a database and I am presented with the choice of file extensions. Unfortunately there is only one choice. ODF files. Not anything that SQLite will open. Below are config files as per closed Question.

Base: how to connect to an SQLite database? [closed]

This is contents of ‘odbinst.ini’ file

[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

This is contents of ‘.odbc.ini’ file

[SQLite]
Description=SQLite
Driver=SQLite
Database=/home/rick/Desktop/sqliteDatabases
Timeout=100000
StepAPI=No
ShortNames=No
FKSupport=Yes
SyncPragma=Normal
JournalMode=Delete
BigInt=No

[SQLite3]
Description=SQLite3
Driver=SQLite3
Database=/home/rick/Desktop/sqliteDatabases/
Timeout=100000
StepAPI=No
ShortNames=No
FKSupport=Yes
SyncPragma=Normal
JournalMode=Delete
BigInt=No

Please do not use an answer for further information. Either use add a comment or edit original question and note additional information. You can, however, answer your own question.

Also your formatting is not correct. There is a toolbar (upper left when posting) which has formatting tools.

Do not see in your odbc.ini definitions any database defined such as MyDB.db just directories. A defined section in ODBC is to a specific DB. See once again the closed question referred to.

Also don’t know what is meant in statement about file extensions. What is needed is an ODBC connection.

In creating a Base file, in the first dialog you select Connect to an existing database & then in dropdown select ODBC. Clicking Next brings you to selecting a source. Click Browse... which lists the connections established in your odbc.ini file.

I revised the odbc.ini file to reflect a database, not the directory. Database=/home/rick/Desktop/sqliteDatabases/renoAZID.db

Following through Base Screens:

Connect to an existing database. checked
→ shows ODBC → next →
shows Name of the ODBC data source on your system → SQLite3 → OK
Finish. checked

Now shows browser with directories to pick from. It doesn’t make a difference if you pick a directory or not . I did pick /home/rick/Desktop/sqliteDatabases/ because that is where my database is. The screen is empty; no databases show. However, on the bottom right corner of the screen is a box saying ODF databases. It has an arrow thingee to get other choices but there is no other choice. END no where else to go.

That is the Save dialog. This step you mention is the actual saving of the Base file. Just pick a directory you want the Base file in and give it a name (top line entry where it is pre-defined as NewDatabase).

Thanks, Dumb me. Worked fine. Apparently then Base makes original database names for the database. My sqlite.db file isn’t touched?

One other thing happened. I tried using the SQLite data source and got the error message “Can’t open 'libsqliteodbc.so file not found” SQL Status 01000 I tried to download it with Sudo apt install libsqliteodbc.so Result: E: Unable to locate package libsqliteodbc.so
E: Couldn’t find any package by glob ‘libsqliteodbc.so’
E: Couldn’t find any package by regex ‘libsqliteodbc.so’
Any ideas?

AND … Where did you find the formatting for the red background?

Thans again, R

No, sqlite.db should not be affected in any way. You may also not be comprehending that Base is only a front end to a database. Base itself is NOT a database.

libsqliteodbc.so is used for SQLite2 databases. If you are using only SQLite3 then it is not needed. If you really need this one I would need to search where to get it, but it doesn’t seem you do. Use the SQLite3 driver. Again, haven’t used in quite some time and it may be both SQLite 2 & 3 will work with the libsqlite3odbc.so driver.

The “red” text as you put it is surround item with back ticks.

I understand that Base is not a database. However, I thought because of it’s connection to sqlite.db’s it would change them. What does it do make a HSQLDB database out of sqlite.db. I thought I saw on the internet where people use Base as a front end to create tables for sqlite.db’s. Tried out backticks on HSQLDB. Handy secret to know about. Again, Thanks, R

Your comment is cryptic. Base does not “change” a database because of a connection.

Base does not make a HSQLDB database out of SQLite. When Base is connected to SQLite, it stays as SQLite and HSQLDB never comes into play.

Regardless of the database used, you can add/change/create/delete tables from the database Base is attached to.