我从数据库中获取数据时的代码:-
while(sqlite3_step(dataRows) == SQLITE_ROW)
{
clsGlobal *temp=[[clsGlobal alloc]init];
//temp.CatId=sqlite3_column_int(dataRows,0);
temp.QId =sqlite3_column_int(dataRows,0);
temp.QName= [NSString stringWithUTF8String:(char *)sqlite3_column_text(dataRows,1)];
temp.ImagePath= [NSString stringWithUTF8String:(char *)sqlite3_column_text(dataRows,2)]; //app crash when imagepath is nil
NSLog(@"%d%@%@",temp.QId,temp.QName,temp.ImagePath);
所以请给我正确的建议和有用的链接。