Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Location
    Washington, DC
    Posts
    24

    Unhappy Unanswered: How to set default date in SQL to

    somthing other than 1/1/1900? I use Visual Studio.NET and Aspx.
    Even if I pass a system.dbnull.value to the table, it keeps showing
    a default date of the above. I want to end-up with a <NULL> for the
    date entry from my code when a user deletes a date from my
    aspx page.

    Thanks,

  2. #2
    Join Date
    Jan 2003
    Location
    México City
    Posts
    31

    Re: How to set default date in SQL to

    You can mix something from:

    use a DEFAULT constraint to your date column
    use NULLIF() function with an out-of-range date
    use ISNULL() function with an out-of-range date
    and check that your table supports NULLs in your date column

    we also have problems passing nulls via VB6 (must be variants).

    Cesar.

  3. #3
    Join Date
    Jan 2003
    Location
    Washington, DC
    Posts
    24

    Cool

    Thanks Cesar,

    I saw a KB on Microsoft saying that functionality is a bug but don't see
    they fixed it. I will give the ole variant a try. Thanks again.

    BobbyJ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •