Results 1 to 4 of 4

Thread: db error

  1. #1

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075

    db error

    I have an update page where the user can change data in the db. When I delete data from a textbox and keep it empty, then save to the db, I get this error:

    String was not recognized as a valid DateTime.

    Is there a way around this?
    thanks
    Last edited by EyeTalion; Jan 21st, 2003 at 03:05 PM.

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    you cannot have blank values in a DateTime field.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075
    in the database it can be null. How do I insert a null value into that field?

  4. #4
    Addicted Member
    Join Date
    Nov 2000
    Posts
    217
    DbNull.Value

Posting Permissions

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



Click Here to Expand Forum to Full Width