I am doing something fundamental wrong but I am searching for better examples on the net and is coming up short :-(
in .h @interface MyDataViewController : UIViewController {
NSArray *array;
}
@property (nonatomic, retain) NSArray *array;
in m
@synthesize array;
succesful dbretrieval:
while (sqlite3_step(statement) == SQLITE_ROW) {
//I guess this one is wrong but I cant figure it out.. (tired?)
array = [NSString stringWithUTF8String:(char *)sqlite3_column_text(statement, 0)];
//testoutput to textfield:
//myName.text = [NSString stringWithUTF8String:(char *)sqlite3_column_text(statement, 0)];
//testoutput to nslog:
NSLog(@"Data: %@",[NSString stringWithUTF8String:(char *)sqlite3_column_text(statement, 0)]);
}
Outputs the last from sqlitequeryn:
NSLog(@"%@", array);