[sqlite] sqlite3_bind_text(): unable to insert "const char*" data into the database.

2012-01-04 Thread Phong Cao
Hello everybody,

I am trying to develop a small music manager using Gtkmm, GStreamermm &
SQLite3 in Linux (Fedora 16 - 64bit). It is able to read metadata (track,
title, artist, album, etc...) of all the files using GStreamermm & inserts
these metadata into the underlying SQLite database. Then it will load these
metadata into the Gtk::TreeView next time it starts.

The program is able to read Gst::TAG_TITLE & Gst::TAG_GENRE and output
these tags into . It can insert the "const char*" of these tags
(I used Glib::ustring::c_str() to convert the Glib::ustring returned by
Gst::TAG_TITLE & Gst::TAG_GENRE into "const char*") to the underlying
SQLite3 database. However, the title & genre of the song do not appear when
I do a query of the SQLite3 database. It seems that sqlite3_bind_text() was
unable to bind the "const char*" returned by Glib::ustring::c_str() & thus
prevents the software from inserting the C-string into the database. I have
been scratching over my head for several days because of this. I wonder if
this is my fault or is there any problem with SQLite3.

I am currently using Fedora 16 with all the latest updates. I used the
latest SQLite3 amalgation package.

Here is the link to download the program. If you can please download it &
type "make" to compile it in your machine & see if there is any problem
with my code, or the libraries.

http://www.mediafire.com/?tazj62a2rcdl3a5

I also included the SQLite3 commands I used to create the underlying
SQLite3 database. The file is named "dingo-model.sql". If you have MySQL
Workbench >= 5.x installed you can open the "dingo.mwb" file and see my
database design. The database file is also included in the same folder and
is named "dingo.db".

Thank you for reading my message! Have a wonderful New Year!


Best regards,


-- 
Phong V. Cao
phn...@gmail.com
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Compile sqlite3 with g++? Do I need a wrapper?

2011-06-27 Thread Phong Cao
Hello everybody,

I am trying to use g++ to compile my C++ application, which uses sqlite3.
After googling for several hours this is what I tried:

g++ -g /home/phongcao/main.cc -o -lsqlite3 /home/phongcao/main `pkg-config
--cflags --libs gtkmm-2.4`

However, the program was not compiled. I also read on some forums saying
that sqlite3 must be compiled with gcc. But since I am using gtkmm and C++
code for my project I wonder if there is anyway possible to compile sqlite3
using g++? If so, please tell me how.

Thank you for reading my message! Have a good day!


Best regards,

-- 
Phong V. Cao
phn...@gmail.com
ca...@rider.edu
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users