我的 sqlite 表结构是:
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)
现在我想在表中插入一条记录,插入列:(日期,光路,wheelId,wheelSize,frontWheelx,frontWheely,rearWheelx,rearWheely)并忽略列:(纬度,经度,locationDescription,地标)
我的代码是:
BOOL 成功 = [lunGaiDataBase executeUpdate:@"插入位置(日期、光路、wheelid、wheelsize、frontwheelx、frontwheely、rearwheelx、returnwheely)值(?,?,?,?,?,?,?,?)",
location.date,location.photoPath, location.wheelId,location.wheelSize,location.frontWheelx,location.frontWheely,location.rearWheelx,location.rearWheely];
我的位置类是:
@property (nonatomic, assign) 双纬度;
@property (nonatomic, assign) 双经度;
@property(非原子,保留)NSDate * 日期;
@property (nonatomic, 保留) NSString * locationDescription;
@property (nonatomic, 保留) NSString * photoPath;
//@property (nonatomic, retain) NSString * category;
@property(非原子,保留)CLPlacemark * 地标;
@property (nonatomic, assign) NSInteger wheelId;
@property(非原子,分配)双前轮;
@property (nonatomic, assign) double frontWheely;
@property(非原子,分配)双后轮;
@property(非原子,分配)双后轮;
@property(非原子,分配)双轮尺寸;
当我运行程序时,它崩溃了!帮我 !!