On 31.03.2011 16:30 john darnell said the following:
> BTW, if there is a better way to get a row count without using 
> sqlite3_get_table() that would also work.

This will work withput fetching the table

     dbrc = sqlite3_prepare_v2 (db, "select count(*) from table", -1, 
&stmt, NULL);
     if (dbrc != SQLITE_OK)
     {
        //error
     }

     if (sqlite3_step(stmt) == SQLITE_ROW)
     {
         count = sqlite3_column_int (stmt, 0);
     }
     else
     {
         count = 0;
     }

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

Reply via email to