描述
返回准备语句返回的结果集中的列数。如果数PreparedStatement pstmt是不返回数据(例如UPDATE)的SQL语句,则此函数返回0。
C / C ++语法
int sqlite3_data_count(sqlite3_stmt *pStmt); |
PB语法
FUNCTION sqlite3_data_count ( _ BYVAL hStmt AS DWORD _ ) AS LONG |
参数
pStmt
[in]语句句柄。
返回值
由准备语句返回的结果集中的列数。
C ++实现代码
/*
** Return the number of values available from the current row of the
** currently executing statement pStmt.
*/
SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt){
Vdbe *pVm = (Vdbe *)pStmt;
if( pVm==0 || pVm->pResultSet==0 ) return 0;
return pVm->nResColumn;
}