I am trying to substitute a null date value (Blasted 12/30/1899) in my select statement. I am using VS 2003 C#. The datasource is Foxpro.
Any ideas !
I am trying to substitute a null date value (Blasted 12/30/1899) in my select statement. I am using VS 2003 C#. The datasource is Foxpro.
Any ideas !
Either they never fixed that natural gas leak and my brain is chemically reacting to form styrofoam, or this is more of an SQL question. Am I right? In which case, what exactly is your problem?
Can you be a bit more precise ? What you describe is normally done by using a simple if statement.
string sql;
if( yourDateVariable == yourDateNullValueConstant )
{
sql = "select * from table where date is null";
}
else
{
sql = "select * from table where date = " + yourDateVariable.ToString();
}
Format the date value according to your database system and date functions / country specifics.
hth
-nv
She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."
When in doubt, read the FAQ.
Then ask a smart question.