It seems like a very subtle difference, but I think sqlite3_column_count will return the number of columns returned by a prepared statement regardless of whether there is data available to get with sqlite3_column_* functions, whereas sqlite3_data_count requires that there be a current result set row available due to sqlite3_step most recently returning SQLITE_ROW. Peter
From: Simon Slavin <slav...@bigfraud.org> >To: General Discussion of SQLite Database <sqlite-users@sqlite.org> >Sent: Tuesday, July 9, 2013 5:11 PM >Subject: Re: [sqlite] Reference to an undefined field > > >By the way, does anyone understand the difference between >sqlite3_column_count() and sqlite3_data_count() ? I mean, I can read the >definitions, but why are they both provided ? Is one more useful than another >sometimes ? > >Simon. >_______________________________________________ >sqlite-users mailing list >sqlite-users@sqlite.org >http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users