Good Morning Richard... thanks for the response... after making the change you suggested and when doing the build, I get the following error:
l "_sqlite3MisuseError", referenced from: -[PointPeekViewController imagePickerController:didFinishPickingMediaWithInfo:] in PointPeekViewController.o ld: symbol(s) not found for architecture armv6 collect2: ld returned 1 exit status This is an iPhone app, using XCode 4 for the build... Regards, Rolf On 5/3/11 6:52 AM, Richard Hipp wrote: > On Tue, May 3, 2011 at 9:46 AM, Rolf Marsh<ro...@pragerphoneapps.com>wrote: > >> Here is my code, written in Obj-C. I can't figure out what I'm doing >> wrong... can someone enlighten me? Please? >> > Set a breakpoint on sqlite3MisuseError() and see where it is being hit. > > >> NSString * errmsg = nil; >> SQLiteDB* db = [SQLiteDB sharedSQLiteDB]; // create the d/b >> >> NSString *insertCommand = [NSString stringWithFormat:@"INSERT FAIL >> INTO CardData (CARD_ID, CARD_NAME, CODE_VAL) VALUES ('/%@', '/%@', >> '/%@')", symbol.data, @"Test Card", symbol.typeName]; >> >> sqlite3_exec(db, [insertCommand UTF8String], NULL, NULL,&errmsg); >> if(errmsg != NULL) >> NSLog(@"insert error: /%@",&errmsg); // DEBUGGING ONLY! >> >> // now, pull it back out of the d/b and display the data >> NSString *sqlStatement = @"SELECT card_id, card_name, code_val FROM >> CardData"; >> sqlite3_stmt *compiledStatement; >> int err = sqlite3_prepare_v2(db, [sqlStatement UTF8String], -1, >> &compiledStatement, NULL); //<----------- error 21 occurs here >> if(err != SQLITE_OK) >> NSLog(@"prepare error: /%@", err); >> else { >> // Loop through the results and add them to the feeds array >> while(sqlite3_step(compiledStatement) == SQLITE_ROW) { >> >> // Read the data from the result row >> resultText.text = [NSString stringWithFormat:@"\nDatabase: >> \n%@ \n%@ \n%@", resultText.text, >> [NSString stringWithUTF8String:(char >> *)sqlite3_column_text(compiledStatement, 0)], >> [NSString stringWithUTF8String:(char >> *)sqlite3_column_text(compiledStatement, 1)], >> [NSString stringWithUTF8String:(char >> *)sqlite3_column_text(compiledStatement, 2)]]; >> } >> sqlite3_finalize(compiledStatement); // release it... >> sqlite3_close(db); >> } >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users