Re: [sqlite] Find in SQLite database

2009-04-22 Thread John Machin
On 22/04/2009 10:29 PM, anna_shahinyan wrote: > Thanks, > > I have created NSString and added the id value, then for creating > statement I have converted NSString to const char* by UTF8String > but the it seems it does no t work as sqlite3_prepare_v2 does not return > SQLITE_OK. Anna, show us t

Re: [sqlite] Find in SQLite database

2009-04-22 Thread Igor Tandetnik
"anna_shahinyan" wrote in message news:23175323.p...@talk.nabble.com > I have created NSString and added the id value, then for creating > statement I have converted NSString to const char* by UTF8String > but the it seems it does no t work as sqlite3_prepare_v2 does not > return SQLITE_OK. My cr

Re: [sqlite] Find in SQLite database

2009-04-22 Thread anna_shahinyan
Thanks, I have created NSString and added the id value, then for creating statement I have converted NSString to const char* by UTF8String but the it seems it does no t work as sqlite3_prepare_v2 does not return SQLITE_OK. Thanks for response. Igor Tandetnik wrote: > > "anna_shahinyan" > w

Re: [sqlite] Find in SQLite database

2009-04-22 Thread Igor Tandetnik
"anna_shahinyan" wrote in message news:23171280.p...@talk.nabble.com > I have tried the following but does not help: > >sqlite3_stmt *stmt; >const char *sql_check = "SELECT * FROM MY_DATABASE WHERE id=?"; >NSString *name = nil; > if(sqlite3_prepare_v2(myDatabase, sql_check,

[sqlite] Find in SQLite database

2009-04-22 Thread anna_shahinyan
Hello, please help me to find a solution to check if the record is already in database or not. I have tried the following but does not help: sqlite3_stmt *stmt; const char *sql_check = "SELECT * FROM MY_DATABASE WHERE id=?"; NSString *name = nil; if(sqlit