[sqlite] how to retrieve the result of an sqlite_exec()

2010-07-20 Thread dmsmsm

Hi,
Iam new to sqlite3. I want to get the number of rows in a table. I am using
sqlite_exec(), but not sure, this is the correct function to get the number
of rows.
Please help me
my code is 

NSString *rowcount = [NSString stringWithFormat:@"SELECT COUNT(*) FROM
DB;"];

char *err;
if (sqlite3_exec(db, [rowcount UTF8String], NULL, NULL, &err) != SQLITE_OK)
{
sqlite3_close(db);
NSAssert(0, @"Failed to get Number of Rows");
}


here in this code, from where can i extract the row count..
Please help!!!

dmsmsm
-- 
View this message in context: 
http://old.nabble.com/how-to-retrieve-the-result-of-an-sqlite_exec%28%29-tp29216324p29216324.html
Sent from the SQLite mailing list archive at Nabble.com.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] how to get the number of rows in a a table?

2010-07-20 Thread dmsmsm

how to get the number of rows in a a table? what is the function to get that?
Please add a sample code to achive that.
thanks
dmsmsm
-- 
View this message in context: 
http://old.nabble.com/how-to-get-the-number-of-rows-in-a-a-table--tp29216126p29216126.html
Sent from the SQLite mailing list archive at Nabble.com.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users