Results 1 to 3 of 3

Thread: [RESOLVED] passing null in a datetime field in my SP.

  1. #1

    Thread Starter
    Fanatic Member popskie's Avatar
    Join Date
    Jul 2005
    Location
    In my chair
    Posts
    666

    Resolved [RESOLVED] passing null in a datetime field in my SP.

    hi,
    How to pass a null value in my StoredProc in DateTime field. If i pass null parameter it give me an error message. Anyone can help me.

    Popskie

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: passing null in a datetime field in my SP.

    A null reference and a null field are two completely different things. To make a database field or parameter null you need to set it to DBNull.Value.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member popskie's Avatar
    Join Date
    Jul 2005
    Location
    In my chair
    Posts
    666

    Re: passing null in a datetime field in my SP.

    thanks for your answer Jm it really work great.

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