>>>When I add a record (from VFP app) to SQL Server database table, field of type SmallDateTime gets value "1/1/1900". Is this by design? The field is set to allow NULLs so I thought that if I leave the date blank, it will set the value to NULL.
>>
>>You've to ommit that field from insert or pass null.
>
>I realize that. But my question still stands, is it SQL Server that sets the field to 1/1/1900? (I wanted to be sure that it is not somewhere in the myriad of my VFP code that this value is set).
The empty date value is not the same as NULL and neither ODBC driver nor SQL Server support empty dates. The SQl Server stores all datetime values as offset from "1/1/1900". That's why empty date is converted to it by SQL Server.
--sb--