title: I am not able to insert data into my sqlite db.. I don't have any error showing up but the values are not inserting into the db
body: <p>Here is my code that I have written..</p>
  
  <pre><code>NSArray *path= NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  NSString *docpath = [path objectAtIndex:0];
  dbpathstring = [docpath stringByAppendingPathComponent:@"UserTable.db"];
  char *error,*error1;
  
  NSFileManager *filemanager= [NSFileManager defaultManager];
  if(![filemanager fileExistsAtPath:dbpathstring])
  {
      const char *dbpath=[dbpathstring UTF8String];
  
      if(sqlite3_open(dbpath, &amp;userdb1)==SQLITE_OK)
      {
          const char *sql_stat= "CREATE TABLE IF NOT EXISTS USERTABLE (CARDNUMBER INTEGER,BALANCE INTEGER,DATE TEXT)";
          sqlite3_exec(userdb1, sql_stat, NULL, NULL, &amp;error);
          sqlite3_close(userdb1);
  
      }
  }
  
  
  if(sqlite3_open([dbpathstring UTF8String], &amp;userdb1)==SQLITE_OK)
  {
  
  
      NSString *insertstmnt= [NSString stringWithFormat:@"INSERT INTO USERTABLE (CARDNUMBER,BALANCE,DATE) VALUES((\"%d\", \"%d\", \"%s\")",[crd1 intValue],[bal1 intValue],[rdt1 UTF8String]];
  
      const char *insert_stmt = [insertstmnt UTF8String];
  
  
      sqlite3_exec(userdb1, insert_stmt, NULL, NULL, &amp;error1);
  
          NSLog(@"After Creation in insert exec");
  
          NSLog(@"row added");
          UserTables *usertable = [[UserTables alloc]init];
          [usertable setCardnumber:[crd1 intValue]];
          [usertable setBalance:[bal1 intValue]];
          [usertable setDate:rdt1];
          [sections addObject:usertable];
  
  
      sqlite3_close(userdb1);
  </code></pre>