Link to home
Start Free TrialLog in
Avatar of tiredntroubled
tiredntroubled

asked on

coldfusion form with sql server

Hi, I am using sql server 2000 and coldfusion. I have a form where I am asking the user to supply dates. (e.g 4/27/2007).
In my database I have the date type smalldatetime.  When the field is left blank, the date stored in the database is 1/1/1900.

I want it so if the field is blank and the user did not supply a date, then there should be no value in the database.

Help please.
Avatar of Aneesh
Aneesh
Flag of Canada image

if you supply blank, sql server wont treat as NULL, instead it will fill the column with the default value of the datetime datatype . so if you want it to be null, you should pass as null
Avatar of tiredntroubled
tiredntroubled

ASKER

How would I pass it as a null?
i am not sure about Coldfusion, if you can move this question under confusion section, i think some will help you.
SOLUTION
Avatar of rucky544
rucky544
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial