Guys i have stored a null value in the column of sqlite database
the value that is storing is return "null"
Now using following code to retrieve 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;
The debugger shows the value of str = "null"
but this condition is not working with str == null , str == "" , str == "null"
anyone can give me a hit of what to do..
Also resultset.isNull gives me a value of false.
So how can i store null in database, secondly if i use "null" then how can i make this condition work.