Results 1 to 3 of 3

Thread: [2008] Details View from DataSet not passing value from DateTimePicker to database?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2007
    Posts
    190

    [2008] Details View from DataSet not passing value from DateTimePicker to database?

    Getting a StartDate does not allow nulls when start date is the value being selected from a DateTimePicker control. Any ideas why?

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Sep 2007
    Posts
    190

    Re: [2008] Details View from DataSet not passing value from DateTimePicker to databas

    I'm taking a shot in the dark with this but from what I think I understand my problem is this.

    The column it should be inserting to is SQL Time(7).

    Now I believe that despite being able to format the DateTimePicker to a Time, or even a custom format as hh:mm:ss, or even doing the custom format in the validation step, that it still is storing the DateTime as a DateTime object, therefore despite it not visually showing the date aspect of it, it is still associated with the value being passed. IE its still passing MM:dd:yyyy hh:mm:ss TT.

    Since this doesn't meat my Time(7) data type in my column, I was running into problems on both the validation of the DateTimePicker and the Coded validation I had within my DataSet to check against each column update and row update events.

    This sound right?

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2008] Details View from DataSet not passing value from DateTimePicker to database?

    Hard to tell without code but if you can find a way to format the date coming from the datetimepicker, you should use that.

    Better, use a javascript based datetime/calendar control which doesn't involve the extra 'hassle' of the ASP.NET one, as it'll be entirely clientside.

    Aside from that, sounds about right if I'm guessing correctly.

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