I have 3 SQLite tables. Each has an ID as primary key; if I provide a NULL when inserting a record to ID, it will auto-increment the key (at least that s what the SQLite docs say). I am trying to get the NULL into this insert statement, but it crashes ( NSInvalidArgumentException , reason: * -[NSPlaceholderString initWithFormat:locale:arguments:]: nil argument ). Here is a snippet of the statement (dbCmd is defined as NSString):
dbCmd = @"INSERT INTO CustData (ID, BUS_NAME, EMAIL, PHONE, SHOP_NAME, SHOP_ADDR1, SHOP_ADDR2, SHOP_CITY_STATE, SHOP_ZIP, "
"SHIP_NAME, SHIP_ADDR1, SHIP_ADDR2, SHIP_CITY_STATE, SHIP_ZIP, SALES_NAME, NOTES) VALUES( ";
dbCmd = [dbCmd stringByAppendingFormat:NULL]; // <--------------------
dbCmd = [dbCmd stringByAppendingString: [methodParameters objectForKey: @"businessName"]];
dbCmd = [dbCmd stringByAppendingString: @" , "];
dbCmd = [dbCmd stringByAppendingString: [methodParameters objectForKey: @"email"]];
我该如何解决这个问题坚强的