Bug 135616 - External text table assigned with SQL Statements is not visible in Firebird embedded server within Base
Summary: External text table assigned with SQL Statements is not visible in Firebird e...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.4.3.2 release
Hardware: x86-64 (AMD64) All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Firebird-Default
  Show dependency treegraph
 
Reported: 2020-08-10 13:56 UTC by JustAsking
Modified: 2023-09-30 17:22 UTC (History)
0 users

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 JustAsking 2020-08-10 13:56:40 UTC
Description:
I'm trying to load data into a Firebird embedded DB using an external table using the SQL statements explained here:

http://www.firebirdfaq.org/faq209/

CREATE TABLE ext1 EXTERNAL 'c:\myfile.txt' ( field1 char(20), field2 smallint );

After that I'm trying to populate an already created normal table with the external data using

INSERT INTO realtable1 (field1, field2) SELECT field1, field2 FROM ext1;

The problem is the data from the external table is not visible in Base and the second statement returns:

1: firebird_sdbc error: *Use of external file at location C:\Program Files\LibreOffice\Cndtn_Code.txt is not allowed by server configuration

I guess this is a problem with the parameter 'ExternalFileAccess' that must be set as either 'Restricted <path>' or 'Full' in the 'firebird.conf' file to allow the access.

The issue is that I can't find 'firebird.conf' in the embedded server distributed with LO. The SQL Statements can be done in macros and I find that way more convenient than the usual copy&paste method to insert existing tables in Base. In the future that could even be automated by the UI.


Steps to Reproduce:
1.Create some text file with sample data for example a test *.csv formatted as fields separated by comma (default character in firebird). For instance: 'text1', 'smallnumber1' save as C:\MYFILE.CSV
2.Create new *.odb file with firebird embedded.
3.In tools > SQL write the following SQL statement CREATE TABLE ext1 EXTERNAL 'C:\MYFILE.CSV' ( field1 char(20), field2 smallint ); 
4.The ext1 table has no fields visible in the UI.
5.In tools > SQL write the following SQL statement CREATE TABLE realtable1( field1 char(20), field2 smallint );
6.In tools > SQL write the following SQL statement INSERT INTO realtable1 (field1, field2) SELECT field1, field2 FROM ext1;
7.The SQL window shows 1: firebird_sdbc error: *Use of external file at location C:\MYFILE.CSV is not allowed by server configuration
8.No data is showed in realtable1.

Actual Results:
No data is showed in neither ext1 nor realtable1.

Expected Results:
Data should be visible in both tables.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
I couldn't find the 'firebird.conf' file in LibreOffice.

Version: 6.4.3.2 (x86)
Build ID: 747b5d0ebf89f41c860ec2a39efd7cb15b54f2d8
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: en-US ; UI-Language: en-US
Calc: threaded
Comment 1 ztminhas 2023-09-30 17:22:19 UTC
hello, it has been three years since this bug was reported. is there any kind of progress?