Guys, I saved a null value in a sqlite database column
the value that is stored is return "null"
Now using the following code to get it
int i = resultSet.getInt(resultSet.getColumnIndex(columnName)); String str = resultSet.getString(resultSet.getColumnIndex(columnName)); boolean bool = resultSet.isNull(resultSet.getColumnIndex(columnName)); if( str == null ) { return -1; } return i;
Debugger shows str = "null"
but this condition does not work with str == null , str == "" , str == "null"
anyone can give me a hit on what to do.
Also resultset.isNull gives me false.
So, how can I store null in the database, and secondly, if I use "null", then how can I make this condition work.
source share