tags:

views:

13

answers:

0

Hello,

I am facing the following dilemma . I am using core data for database Operations. I have the following code .

*const char *sql = "SELECT id, title, data, size, red_comp, green_comp, blue_comp FROM DrawingInforec"; 
  sqlite3_stmt *statement;

  if (sqlite3_prepare_v2(database, sql, -1, &statement, NULL) != SQLITE_OK) {  
   NSLog(@"Error, failed to prepare statement, normally handle error here.");  
  }* 

This code works well in simulator but when I try to run on Device, it does not allocate memory to sqlite3_stmt *statement . I mean that in simulator memory is alloted to sqlite3_stmt *statement but on device during Debuugging, it shows 0*0 to sqlite3_stmt *statement. Can anybody provide me the solution or reasoning behind that ? Thanks in advance .