i am trying to implement following Code…
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(),
});
Now the initial value of parentAccoudId (Type int ) is null. It is actually converting null to to.String
When i try to run it gives error of Null pointer.
I want to store null value in database please tell me how can i do that.
Best Regards
Use: