Advertise here

Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sqlite data not inserted.

jitendrajitendra Posts: 59New Users @
NSArray * dirs = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString * dbPath = [NSString stringWithFormat:@%@/MathsTricks.sqlite",[dirs lastObject]];


sqlite3 * db;

if( sqlite3_open([dbPath UTF8String], &db) != SQLITE_OK )
NSLog(@i am in open method);

NSString *str = [NSString stringWithFormat:@insert into Bookmark bname,bnamedescription,number values('%@','%@','%@')",delegate.str,delegate.str1,delegate.str2];


const char * sql = [str UTF8String];

if(sqlite3_exec(db, sql, NULL, NULL, NULL) == SQLITE_OK)

NSLog(@data inserted);
NSLog(@failed to insert);

Query fire perfectly but data not inserted into Sqlite.

Why this happening please help me out this.
Sign In or Register to comment.