Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - qdb: Failed to create the database file: (3 Items)
   
qdb: Failed to create the database file  
Hello all,
I try to create and start a qdb database for QNX 7.00  with the following command:
# qdb -vvvvvv -otempstore=/opt/qdb_database/tmpstore/ -Rauto -A

Even if the qdb process is started correctly and even though I do not receive any error message, the file:
"/opt/qdb_database/qad_proc_database_file_db" 
is not created as I expect and as it is instructed to to in the " /pps/qnx/qdb/config/qdb.conf " file (see below)

Subsequently when I try to run my c application: 
" hdl = qdb_connect("/opt/qdb_database/qad_proc_database_file_db", 0);"

I get the error message: "Error connecting to database: No such file or directory"

Can anyone help me with this one?

For ref:
------- content/pps/qnx/qdb/config/qdb.conf ----------------------------
@qdb.conf
Filename::/opt/qdb_database/qad_proc_database_file_db
SchemaFile::/opt/qdb_database/qad_proc_main_schema.sql
DataSchemaFile::/opt/qdb_database/qad_proc_data_schema.sql
ClientSchemaFile::/opt/qdb_database/qad_proc_client_schema.sql
------------ end --------------------------

------- content of SchemaFile: /opt/qdb_database/qad_proc_main_schema.sql ----------------------------
CREATE TABLE customers(
  customerid INTEGER PRIMARY KEY AUTOINCREMENT,
  firstname  TEXT,
  lastname   TEXT,
  amount     INTEGER
);
------------ end --------------------------
 
------- content o fDataSchemaFile: /opt/qdb_database/qad_proc_data_schema.sql ----------------------------
INSERT INTO customers(firstname, lastname, amount)
  VALUES("Scipio", "Zetor", 898010);
------------ end --------------------------
 
------- content of:ClientSchemaFile: /opt/qdb_database/qad_proc_client_schema.sql----------------------------
PRAGMA journal_mode = PERSIST;
PRAGMA case_sensitive_like = true;
PRAGMA locking_mode = EXCLUSIVE
------------ end --------------------------
Re: qdb: Failed to create the database file  
A few things come to mind - but bear in mind, I have no specific qdb (nor qad) experience :-)

- have you made sure there's no character set differences (eg, UTF vs ascii) between various encodings of the filenames?

- are you sure there are no special characters somewhere in one of those strings (these sometimes occur with copy&paste 
between windows and other OSs)?
- can you create the db file manually (ie, "touch")?
- you have quite a high verbosity for qdb ... is there anything meaningful in the logs?

HTH
Michael

On Mon, 2018-07-23 at 05:09 -0400, Ovidiu Zaharia wrote:

Hello all,
I try to create and start a qdb database for QNX 7.00  with the following command:
# qdb -vvvvvv -otempstore=/opt/qdb_database/tmpstore/ -Rauto -A

Even if the qdb process is started correctly and even though I do not receive any error message, the file:
"/opt/qdb_database/qad_proc_database_file_db"
is not created as I expect and as it is instructed to to in the " /pps/qnx/qdb/config/qdb.conf " file (see below)

Subsequently when I try to run my c application:
" hdl = qdb_connect("/opt/qdb_database/qad_proc_database_file_db", 0);"

I get the error message: "Error connecting to database: No such file or directory"

Can anyone help me with this one?

For ref:
------- content/pps/qnx/qdb/config/qdb.conf ----------------------------
@qdb.conf
Filename::/opt/qdb_database/qad_proc_database_file_db
SchemaFile::/opt/qdb_database/qad_proc_main_schema.sql
DataSchemaFile::/opt/qdb_database/qad_proc_data_schema.sql
ClientSchemaFile::/opt/qdb_database/qad_proc_client_schema.sql
------------ end --------------------------

------- content of SchemaFile: /opt/qdb_database/qad_proc_main_schema.sql ----------------------------
CREATE TABLE customers(
  customerid INTEGER PRIMARY KEY AUTOINCREMENT,
  firstname  TEXT,
  lastname   TEXT,
  amount     INTEGER
);
------------ end --------------------------

------- content o fDataSchemaFile: /opt/qdb_database/qad_proc_data_schema.sql ----------------------------
INSERT INTO customers(firstname, lastname, amount)
  VALUES("Scipio", "Zetor", 898010);
------------ end --------------------------

------- content of:ClientSchemaFile: /opt/qdb_database/qad_proc_client_schema.sql----------------------------
PRAGMA journal_mode = PERSIST;
PRAGMA case_sensitive_like = true;
PRAGMA locking_mode = EXCLUSIVE
------------ end --------------------------




_______________________________________________

OSTech
http://community.qnx.com/sf/go/post118988
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com<mailto:ostech
-core_os-unsubscribe@community.qnx.com>;

Attachment: HTML sf-attachment-mime36825 3.26 KB
Re: qdb: Failed to create the database file  
Hello,
Indeed I had a missing quote sign but it was visible only in the logs. However by running qdb -V the eoor was put also 
in the console.

Now I have the problem described here: http://community.qnx.com/sf/go/projects.multimedia/discussion.general.topc15992 
when I run the sample program from the  QDB Developer's Guide -> QDB Application Example

The console outputs the Error : Input/output error

Would it be possible to have the bug still inside with QNX 700?

Regards,
OZ