Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Invalid Date with Calendar errors with SQL Validation
Last Post 08-21-2013 09:46 AM by Ryan Bakerink. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
TonyUser is Offline
going with the flow
going with the flow
Posts:45
Avatar

--
08-20-2013 03:45 PM

    Hi,

    I created a date field using textbox/calendar.  Then I added the SQL validation to ensure the text box has a valid date in case the user enters it instead of using the calendar.  When I enter 13/13/13 into the text box and click submit the validation text is as follows:

    DECLARE @var1 datetime SET @var1 = 'Error saving date response' DECLARE @booleanTrueFalse int SET @booleanTrueFalse = 0 IF isDate(@var1) = 1 BEGIN SET @booleanTrueFalse = 1 SELECT @booleanTrueFalse As IsValid END ELSE BEGIN SET @booleanTrueFalse = 0 SELECT @booleanTrueFalse As IsValid END

    Notice that the value of the text box is 'Error saving date response' instead of 13/13/13 or null.  Why is this not just the value of the textbox?

    Thanks,
    Tony Green

    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    08-21-2013 05:40 AM
    Hello Tony,

    The Date Question type should be avoided, this field is great for Birthdate, Credit Card Expiration dates, etc..

    But I would recommend that you make this a Question Type = Textbox. You can even include a jQuery Datepicker to allow the user to select a date from a great looking calendar. You'll see this plugin here:

    http://jqueryui.com/datepicker/


    The same SQL Validation you have above should work with a Question Type = Textbox.

    Please let me know if you have any questions.

    Thanks,

    Ryan
    TonyUser is Offline
    going with the flow
    going with the flow
    Posts:45
    Avatar

    --
    08-21-2013 08:47 AM
    Ryan,
    The problem is the validation not the data entry portion. Wouldn't the examples you cited (Birthday, etc.) have the same problems as they can't be validated properly?

    Thanks,
    Tony
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    08-21-2013 09:46 AM
    Hello Tony,

    The Date Question Type allows several different combinations. Such as textbox, 3 combo boxes(month, day, year), 2 combo boxes (month, year). So you can definitely restrict the inputs when it comes to dates by using the combo box options.

    When using the Date Question with Textbox/free form entry, if any date provided is invalid, then on submission this explains why you're receiving the "Error saving date response" response. This is according to a built in validation that occurs upon server side.

    You can also make your validation instead of SQL validation into a Client Side(JavaScript) validation to check on the fly if the date inputted is valid or invalid and act appropriately.


    OR your SQL Validation can become:

    --------------------------------------------------------------------------------------------------------
    DECLARE @var1 nvarchar(200)

    IF '$(DateField)' = 'Error saving date response'
    BEGIN
    SELECT 'False' As IsValid
    END

    ELSE
    BEGIN
    SELECT 'True' As IsValid
    END
    --------------------------------------------------------------------------------------------------------

    Please let me know if you have any questions.

    Thanks,

    Ryan

    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi