G
Guest
I have a variable dDOB AS DATE to which I attach a date value from a text box
on a form. This date is then written to a table in SQL Server by passing it
in a parameter @DOB.
If no date in entereed by the user, I would like the field in the table to
remain <NULL>. However, when I try attach a null value to dDOB, I get a type
mismatch error.
I tried changing the variable to varDOB, which can accept NULL but then I
get a conversion error in the stored procedure if the date isn't null.
How can I get round this problem?
many thanks,
Pete
on a form. This date is then written to a table in SQL Server by passing it
in a parameter @DOB.
If no date in entereed by the user, I would like the field in the table to
remain <NULL>. However, when I try attach a null value to dDOB, I get a type
mismatch error.
I tried changing the variable to varDOB, which can accept NULL but then I
get a conversion error in the stored procedure if the date isn't null.
How can I get round this problem?
many thanks,
Pete