Can't create Base tables with SQL commands

Hi everyone,

when I try to create even the simplest table in Base (.odb embedded firebird file), by “Tools → SQL” command input, it always fails. This is the command:

CREATE TABLE Students (
StudentId Integer
);

This is the error:

firebird_sdbc error:
*Dynamic SQL Error
*SQL error code = -104
*Token unknown - line 1, column 14
*`
caused by
‘isc_dsql_prepare’

My OS:
4.18.0-24-generic #25~18.04.1-Ubuntu SMP Thu Jun 20 11:13:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux. No LSB modules are available. Description: Zorin OS 15 Release: 15 Codename: bionic.

Libreoffice:
Version: 6.2.4.2
Build ID: 1:6.2.4-0ubuntu0.18.04.1~lo1
CPU threads: 4; OS: Linux 4.18; UI render: default; VCL: gtk3;
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

SQL:
mysql Ver 14.14 Distrib 5.7.26, for Linux (x86_64) using EditLine wrapper
Connection id: 10
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ‘’
Using delimiter: ;
Server version: 5.7.26-0ubuntu0.18.04.1 (Ubuntu)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/run/mysqld/mysqld.sock
Uptime: 12 min 46 sec

My HW:
AMD 200GE, B450M S2H, 4GB RAM

I’m slightly experienced Linux user, just installed SQL server and client + service. Maybe there’s something wrong with Base accesing SQL server because of username or password? Or the syntax of SQL commands to import should be different? I’m getting these commands from Lucidchart ERD export (I can choose among MySQL, PostgreSQL, SQL server and Oracle syntax).

Thanks for any tips!
Vladimir

Hello,

Whenever dealing with a particular database, the manual is the best reference. For Firebird you can find this here → Firebird documentation. See the “Firebird 2.5 Language Reference” as this is the latest.

On my system (Ubuntu 18.04) LO is:

Version: 6.2.0.3
Build ID: 98c6a8a1c6c7b144ce3cc729e34964b47ce25d62
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

There was no error generated when running the statement as you presented. There was problems with using it to enter any data as it is missing a “Primary Key” (needed in all DB tables). Your table and field names would not be as entered; as is would convert to all caps.

Your statement (very simple) is better as:

CREATE TABLE “Students” ( “StudentId” Integer NOT NULL PRIMARY KEY);

Another sample can be found in this post → How to create an auto-increment ID column in a Firebird embedded database table? Errors encountered..

If you have further problems it is possible you have a corrupt user profile. In that case for repair see → LibreOffice user profile.

Firebird works with just LO installed. There is no need to install any other servers ( as your stated “SQL server and client + service” ). You only need to install other servers if you intend to use a different database such as MariaDB, MySQL, PostgreSQL etc.

Thanks a lot, I apparently trusted the exported syntax too much - I’m going to do my SQL syntax homework :slight_smile: V.