I'm having a problem. I am reading a double value out of my database like so:
double VisitDate = rsReport.getDouble("VisitDate");
My database allows nulls values so I want to check if this value is null. I tried quite a few things, but keep getting error messages.
I remember something I saw once about needing to convert this to a Double data type in order to check for a null value. So I tried:
double VisitDateCheck = Double.valueOf(VisitDate).doubleValue();
But I got an error message there as well.
If I first make my VisitDate variable a string and then use the Double data type that seems to work. However, I find it hard to believe that I have to take a double, cast it to a string, and then back to a double just to check if the value is null.
What am I doing wrong?? Thanks in advance for any and all help!
double VisitDate = rsReport.getDouble("VisitDate");
My database allows nulls values so I want to check if this value is null. I tried quite a few things, but keep getting error messages.
I remember something I saw once about needing to convert this to a Double data type in order to check for a null value. So I tried:
double VisitDateCheck = Double.valueOf(VisitDate).doubleValue();
But I got an error message there as well.
If I first make my VisitDate variable a string and then use the Double data type that seems to work. However, I find it hard to believe that I have to take a double, cast it to a string, and then back to a double just to check if the value is null.
What am I doing wrong?? Thanks in advance for any and all help!