Ryan Allen(deleted)
|
Re: QDB server & database not found
|
Ryan Allen(deleted)
05/22/2013 11:16 AM
post101602
|
Re: QDB server & database not found
Read through the "Starting QDB" section of the documentation here:
http://www.qnx.com/developers/docs/6.5.0_sp1/topic/com.qnx.doc.qdb_en_dev_g
uide/starting.html?cp=2_0_2
This will help you to start the qdb server. When this is running you will
see your configured databases in /dev/qdb/ (use "ls /dev/qdb/" to see).
If you do not see /dev/qdb/ please confirm that qdb started successfully;
if you do not see your database name listed please confirm that it is
properly configured (start qdb with "-vvvvv" and check "sloginfo" for an
error messages).
If qdb is running you can use the qdb_*() APIs in an application to
interact with qdb; you can also use the command-line utility "qdbc". Qdbc
is primarily used to run SQL statements on your database:
http://www.qnx.com/developers/docs/6.5.0_sp1/topic/com.qnx.doc.qdb_en_dev_g
uide/qdbc.html?cp=2_0_3
--
Ryan J. Allen
QNX Software Systems
On 13-05-19 9:08 PM, "Jian Rong Yong" <community-noreply@qnx.com> wrote:
>Hi,
>i have read about the qdb server under the help section and i have no
>clue on how to interact with it. Also when i use qdb_connect() to connect
>to the database, it replied with a "No such path or directory".
>please advise.
>
>Thanks,
>Jian Rong
|
|
|
Dennis Kellly
|
Re: QDB server & database not found
|
Dennis Kellly
05/22/2013 11:26 AM
post101603
|
Re: QDB server & database not found
The reference example not real specific, but you need create file /db/customerdb.cfg as the text between dashes-
-------
[customerdb]
Filename=/db/customerdb
Schema File=/db/customerdb.sql
/db/customerdb.sql:
CREATE TABLE customers(
custoemrid INTEGER PRIMARY KEY AUTOINCREMENT,
firstname TEXT,
lastname TEXT
)
-------
Then start qdb as...
# qdb -c /db/qdb.cfg -vvvvvv -otempstore=/tmp -Rauto -A
If it succeeds, you should see...
QDB: created missing database customerdb
and /dev/qdb/customerdb will exist.
|
|
|