my sqlite table structure is :
CREATE TABLE "location" ("latitude" DOUBLE,"longitude" DOUBLE,"date" DATETIME,"locationDescription" VARCHAR,"photopath" VARCHAR,"placemark" BLOB,"wheelId" INTEGER,"wheelSize" DOUBLE,"frontWheelx" DOUBLE,"frontWheely" DOUBLE,"rearWheelx" DOUBLE,"rearWheely" DOUBLE)
and now I want to insert one record into the table, insert column : ( date , photopath , wheelId , wheelSize , frontWheelx , frontWheely , rearWheelx , rearWheely ) and ignore column : (latitude , longitude , locationDescription , placemark)
my code is :
BOOL succeed = [lunGaiDataBase executeUpdate:@"insert into location (date, photopath, wheelid, wheelsize, frontwheelx, frontwheely, rearwheelx, rearwheely) values(?,?,?,?,?,?,?,?)",
location.date,location.photoPath, location.wheelId,location.wheelSize,location.frontWheelx,location.frontWheely,location.rearWheelx,location.rearWheely];
my location class is :
@property (nonatomic, assign) double latitude;
@property (nonatomic, assign) double longitude;
@property (nonatomic, retain) NSDate * date;
@property (nonatomic, retain) NSString * locationDescription;
@property (nonatomic, retain) NSString * photoPath;
//@property (nonatomic, retain) NSString * category;
@property (nonatomic, retain) CLPlacemark * placemark;
@property (nonatomic, assign) NSInteger wheelId;
@property (nonatomic, assign) double frontWheelx;
@property (nonatomic, assign) double frontWheely;
@property (nonatomic, assign) double rearWheelx;
@property (nonatomic, assign) double rearWheely;
@property (nonatomic, assign) double wheelSize;
when I run the program, it crashed !! Help me !!