Kapil Choubisa
Kapil Choubisa

Reputation: 5232

check if row updated or not in sqlite?

I am using sqlite database in my iphone app. I am writing code for update record on certain condition. While my query is correct how can I detect that any row is updated or not.. I had tried SQLITE_DONE but it shows that query executed or not... What to use.. Here is my code..

const char *sqlStmt = [strQuery UTF8String];
    if (sqlite3_prepare_v2(database, sqlStmt, -1, &compiledStatement, NULL) == SQLITE_OK) {
        isSucceed = sqlite3_step(compiledStatement) == SQLITE_DONE;
        //isSucceed = YES;
    }

what will be in place SQLITE_DONE

Upvotes: 0

Views: 855

Answers (1)

I think you're looking for sqlite3_changes().

Upvotes: 2

Related Questions