tags:

views:

202

answers:

1

Hello,

Anyone have idea about how to bind Boolean in sqlite with objective - c.

i know how to bind int and string but i don't know about boolean value.

sqlite3_bind_int(addStmt, 1, id);
sqlite3_bind_text(addStmt,3 ,[message UTF8String], -1,  SQLITE_TRANSIENT);  

but how can i bind boolean value.

Please help me.

Thanks you

+1  A: 

SQLite does not distinguish booleans from ints. So you can just use bind_int. The only real storage classes are NULL, INTEGER, REAL, TEXT, and BLOB. Note:

"But as soon as INTEGER values are read off of disk and into memory for processing, they are converted to the most general datatype (8-byte signed integer)."

Matthew Flaschen
Thanks you for fast reply, i am very thankful.
milanjansari
You can accept an answer by clicking the check mark. See http://meta.stackoverflow.com/questions/5234/accepting-answers-whats-it-all-about
Matthew Flaschen