We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question
0

[SOLVED] LO Base Can't Connect to Sqlite3

asked 2019-11-27 17:17:01 +0200

kasloman gravatar image

updated 2019-12-03 18:19:34 +0200

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$

edit retag flag offensive close merge delete

Comments

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

Also posted here -> https://forum.openoffice.org/en/forum...

Ratslinger gravatar imageRatslinger ( 2019-11-27 20:56:37 +0200 )edit

@kasloman,

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

Ratslinger gravatar imageRatslinger ( 2019-12-03 18:26:10 +0200 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2019-12-01 21:27:17 +0200

kasloman gravatar image

updated 2019-12-01 22:39:25 +0200

Ratslinger gravatar image

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
edit flag offensive delete link more

Comments

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.

Ratslinger gravatar imageRatslinger ( 2019-12-01 21:56:41 +0200 )edit

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.

Ratslinger gravatar imageRatslinger ( 2019-12-01 22:06:52 +0200 )edit

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.

kasloman gravatar imagekasloman ( 2019-12-02 00:56:53 +0200 )edit

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).

Ratslinger gravatar imageRatslinger ( 2019-12-02 01:11:15 +0200 )edit

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

kasloman gravatar imagekasloman ( 2019-12-02 01:48:26 +0200 )edit

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.

Ratslinger gravatar imageRatslinger ( 2019-12-02 02:29:40 +0200 )edit

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

kasloman gravatar imagekasloman ( 2019-12-02 19:02:05 +0200 )edit

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.

Ratslinger gravatar imageRatslinger ( 2019-12-02 19:11:28 +0200 )edit
0

answered 2019-11-27 19:51:12 +0200

Ratslinger gravatar image

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:

https://ask.libreoffice.org/en/questi...

https://ask.libreoffice.org/en/questi...

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

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2019-11-27 17:17:01 +0200

Seen: 1,028 times

Last updated: Dec 03 '19