cocoa touch - iPhone App Crashes on Launch Due to Inconsistencies? -


My source code has something very strange that the application was always created successfully, and I was always able to launch the application Was there. However recently, when I launch it and return the following error to the console:

  2009-07-23 20: 30: 06.390 App [15652: 20b] Database successfully opened: ) Failure of failure in the 2009-07-23 20: 30: 06.3 9 3 AP [15652: 20B] *** [App Deligail Initialized TableData], /Users / IM / Desktop / App / Classes / AppDigital.I 2009 -07-23 20: 30: 06.394 App [15652: 20b] *** 'NSININInsistency Expression' expired due to exception of exception The reason: 'Error in making statement' 2009-07-23 20:30 30: 06.394 App [15652: 20b] Stack: ( 

I do not understand. Always launch successfully with no errors, but now I get this error. I had supported my source code together and now when I get those old versions, I get a single error. How is this possible? Can the code be bad? If I successfully launch an application Was able and today I went back to make compile it again and it gives an error ... the Piaiisii ​​of code?

The error seems to indicate t to its piece of code in my app djlet file:

  Enter the code - (zero) initializeTableData {entries = [[NSMutableArray Alloc] init]; Sqlite3 * db = [AppDelegate getNewDBConnection]; Sqlite3_stmt * statement = zero; Const char * sql = "Choose * from dict" *; If (sqlite3_prepare_v2 (DB, SCL, -1, and statement, NULL)! = SQLITE_OK) NSAssert1 (0, @ "Error creating statement", sqlite3_errmsg (db)); Else {while (sqlite3_step (Statement) == SQLITE_ROW) {// Result Line NSString * aurumukhhi = [NSString stringWithUTF8String: Read the data from (four *) sqlite3_column_text (statement, 0)]; NSString * One Shah Main = [NSString string withUTF8 string: (four *) sqlite3_column_text (statement, 1)]; NSString * aPOS = [NSString string withUTF8 string: (four *) sqlite3_column_text (statement, 2)]; NSString * aEnglish = [NSString string withUTF8 string: (four *) sqlite3_column_text (statement, 3)]; // Create a new animal object with data from the database Entry * Entry = [[Entry Alok] initWithName: a Gurumuhi Shahrukhya: A Shahmukhi: APOS English: A English]; // Add animal item to animals array [entries addObject: entry]; [Entry release]; }} // release resource sqlite3_finalize (statement);  

}

  + (sqlite3 *) getNewDBConnection {sqlite3 * newDBconnection; NSArray * path = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, yes); NSString * document directory = [path item overindexx: 0]; NSString * path = [document directory string packet path comparison: @ "pediket DB"]; // Database Open was prepared outside the database application. If (sqlite3_open ([path UTF8String], and newDBconnection) == SQLITE_OK {nslog (@ "database was opened successfully :)); } Error: {"Opening Database"] {} return to new dbconction;  

}

This is a problem in the database connection,

The database has changed in my project but if I have not installed a new app on the simulator / device then I usually get this error. / P>

If you do not have Apple If you are using an ant app, this copies the database to the folder in the folder, the app is run for the first time and does all the operations on this database. If you change your DB file, you can delete the app from your device / simulator. And then have to do a fresh installation.


Comments