Thanks, I already knew that.
I am trying to return to the user the "famous" affected rows state, but I am
not able to know before hand whether it's a create table, select, update,
etc statement.
So if sqlite3_column_count == 0 the I am positive it is not a select and it
's possibly an insert or update, but create table also returns 0.
My intention is to return the changes number only if it's an insert or
update (without parsing the statement), and I see no way to know it.

----- Original Message ----- 
From: "CARIOTOGLOU MIKE" <[EMAIL PROTECTED]>
To: "sqlite" <[EMAIL PROTECTED]>
Sent: Monday, July 26, 2004 2:59 PM
Subject: RE: [sqlite] v3 pragmas


> > Is there any way to know the type of the current statement,
> > i.e.: select,
> > insert, delete, etc?
> > I would like to know it to retrieve the sqlite3_changes()
> > value after the
> > statement has finished to return that value to the user.
> >
> (almost) what you need :
>
> ** Return the number of columns in the result set returned by the compiled
> ** SQL statement. This routine returns 0 if pStmt is an SQL statement
> ** that does not return data (for example an UPDATE).
> */
> int sqlite3_column_count(sqlite3_stmt *pStmt);
>

Reply via email to