Chatar Veer Suthar
Chatar Veer Suthar

Reputation: 15639

how to update integer value in sqlite3 database?

How can I update an integer type of column, so what should I write, as I am updating string, then I will write as follows

        sqlite3_bind_text(compiledStatement, 1, [name UTF8String], -1, SQLITE_TRANSIENT);

This is updating NSString(varchar), so how to write for integer value????

Upvotes: 1

Views: 264

Answers (2)

Michael Behan
Michael Behan

Reputation: 3443

sqlite3_bind_int

see: http://www.sqlite.org/c3ref/bind_blob.html

Upvotes: 1

Janak Nirmal
Janak Nirmal

Reputation: 22726

Similarly as text

sqlite3_bind_int(compiledStatement, columnNo, integerValue);

Hope this helps

Upvotes: 2

Related Questions