in a database called 'db' I created a table named 'friend' that looks like
this:
string create_table( "CREATE TABLE friend (name TEXT, address TEXT, age
INT)");
I entered some values in that table and now I would like to extract the
values from that table. Shown below is what I have done so far, but I have
hit a wall, I cannot find definitive information as to how to view the
extracted data, if any.
What do I do next to view the data from that table?
TIA
---- snip ----
getData(){
string sName;
string sAddress;
int age = 0;
string dbdata = "SELECT * FROM friend";
rc = sqlite3_prepare_v2(
db, /* Database handle */
dbdata.c_str() , /* SQL statement, UTF-8 encoded */
dbdata.length(), /* Maximum length of zSql in bytes. */
&stmt, /* OUT: Statement handle */
NULL /* OUT: Pointer to unused portion of
zSql */
);
....
rc = sqlite3_step(stmt);
?????
}
A pessimist is one who makes difficulties of his opportunities and an
optimist is one who makes opportunities of his difficulties.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users