0
我想实现下面的代码空...存储在SQLite数据库为Android
String updateQuery ="INSERT INTO MAAccounts(userId, accountId, accountType, accountName, parentAccountId) VALUES(?, ?, ?, ?, ?)";
Cursor c = mDb.rawQuery(updateQuery, new String[]{
stringToDB(account.userId),
integerToDB(account.accountId).toString(),
integerToDB(account.accountType.getValue()).toString(),
stringToDB(account.accountName),
integerToDB(account.parentAccountId).toString(),
});
现在parentAccoudId(int类型)的初始值是零。它实际上是将null转换为to.String
当我尝试运行它给出空指针的错误。
我想在数据库中存储空值,请告诉我该怎么做。
最好的问候
确定我这样做,但现在表示,在指数4绑定值为null。任何想法? – 2012-02-06 06:23:00