Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Default value of Null

Author  Topic 

rodarama
Starting Member

13 Posts

Posted - 2000-12-01 : 14:15:13
I have a situation where I build an update statement using VBScript in an ASP page. The statement pulls then builds the SET clause from variables from a form on a previous page.

The problem is with some datetime fields. If the field is Null or Empty, the variable writes 01/01/1900 by default into my SQL 7 db.

To complicate matters, the statement is part of a loop, so that I can update multiple fields.

I tried a dozen different ways in the ASP page to sort this out, but the real problem seems to be in the db.

I tried giving the field (which allows Nulls) a default value of Null, but it still goes for the 01/01/1900 (which I assume it is getting from my regional settings).

There must be some way to do this.

Any suggestions?

Quality Awards At Award-Winning Prices!
   

- Advertisement -