这个是报错情况:
05-18 12:21:49.976: I/Database(5166): sqlite returned: error code = 1, msg = near "order": syntax error
05-18 12:21:49.976: E/Database(5166): Failure 1 (near "order": syntax error) on 0x2c4958 when preparing 'create table dict2 (_id integer primary key autoincrement , dev_id varchar(300) , receiver varchar(300) , receive_time varchar(300) , info_source varchar(300) , task_type varchar(300) , task_id varchar(300) , task_name varchar(300) , order varchar(300) , location varchar(300) , event_time varchar(30) , pic_path_down varchar(30) , vehicle_fault_num varchar(300) , vehicle_fault_type varchar(300) , parking_position varchar(300) , cargo varchar(300), wrecker_num varchar(300) , wrecker_type varchar(300) , driver varchar(300) , co_driver varchar(300) , state varchar(300))'.
这个是源码不知道哪里有问题了
final String CREATE_TABLE_SQL = "create table dict2 (_id integer primary key autoincrement , dev_id varchar(300) , receiver varchar(300) , receive_time varchar(300) , info_source varchar(300) , task_type varchar(300) , task_id varchar(300) , task_name varchar(300) , order varchar(300) , location varchar(300) , event_time varchar(30) , pic_path_down varchar(30) , vehicle_fault_num varchar(300) , vehicle_fault_type varchar(300) , parking_position varchar(300) , cargo varchar(300), wrecker_num varchar(300) , wrecker_type varchar(300) , driver varchar(300) , co_driver varchar(300) , state varchar(300))";
public MyDatabaseHelper(Context context, String name, CursorFactory factory,int version)
{
super(context,name,null,version);
}
public void onCreate(SQLiteDatabase db)
{
db.execSQL(CREATE_TABLE_SQL);
System.out.println("44");
String insertStr1 = "insert into dict2(dev_id,receiver,receive_time,info_source,task_type,task_id,task_name,order,location,event_time,pic_path_down,vehicle_fault_num,vehicle_fault_type,parking_position,cargo,wrecker_num,wrecker_type,driver,co_driver,state) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
String[] insertValue1_1 = { "抛锚","东2","514134","0","3","抛锚","东2","514134","0","3","抛锚","东2","514134","0","3","抛锚","东2","514134","0","3"};
db.execSQL(insertStr1, insertValue1_1);
}