public static final String Database_Name="content.db";
public static final int Database_Version=1;
public static final String Table_Name="images";
public static final String Column1="contentid";
public static final String Column2="content_type";
public static final String Column3="content";
public static final String Column4="has_update";
public static final String Column5="server";
public static final String Column6="_id";
public static final String Create_Database =
"CREATE TABLE " + Table_Name +
" (" + Column6 + " INTEGER PRIMARY KEY AUTOINCREMENT, " +
Column1 + " LONG, " +
Column2 + " TEXT NOT NULL, " +
Column3 + " TEXT NOT NULL, " +
Column4 + " INTEGER, " +
Column5 + " INTEGER); ";
我正在使用上面的代码并执行 Create_Database 查询在 android 数据库中创建一个表,但是我在 logcat 中收到一个错误,说自动增量只能分配给一个整数主键?我在这里做错了什么?
02-17 21:08:27.016: E/SQLiteLog(8460): (1) AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY
这是我在 logcat 中遇到的错误。任何帮助.....