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!

Date Field Updating even when empty
Last Post 09-21-2012 09:18 AM by Angela. 4 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
AngelaUser is Offline
wading in the water
wading in the water
Posts:17
Avatar

--
09-06-2012 05:10 AM

    I am running into a problem where I have a form that has about 6 date fields (using the textbox / calendar option).  I'm updating the record on submit but what I'm finding is that if the date fields are empty is updating the values with '1900-01-01 00:00:00.000'

    I need to to insert a null value if the box is empty. 

    On my sql statement normally I'd use

    update table

    set
    value1 = case when '$(value1)' = '1900-01-01 00:00:00.000' then null else '$(value1)' end,
    set value2 = case when '$(value2)' = '1900-01-01 00:00:00.000' then null else '$(value2)' end, 
    set value3 = case when '$(value3)' = '1900-01-01 00:00:00.000' then null else '$(value3)' end
    where value = $(dsparam1)

    Note: this works if I run it in sql manager.

    Anybody else run in to this or have any suggestions?


    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    09-06-2012 07:20 AM
    Hi Angela,

    You might enable debug mode on the form and see what the exact SQL statement is running when you copy / paste the query that the module is using. At first glance it looks like you might need ' marks around your $(DSParam1) token.

    Thanks!

    Chad
    AngelaUser is Offline
    wading in the water
    wading in the water
    Posts:17
    Avatar

    --
    09-06-2012 07:46 AM

    I may not have made my question clear. 

    The insert works just fine.  But it's inserting '1900-01-01 00:00:00.000' into the date fields even though the user does not fill them in.

    This is why I was attempting to use a case when. But it still inserts the '1900' date when I put my statement into the Dynamic Form Completion Event.




     



     


     

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    09-06-2012 10:18 AM
    Hi - Yes, in this case you likely need to either run a TSQL Replace statement or run a TSQL Update statement after the insert is handled.

    Thanks,

    Chad
    AngelaUser is Offline
    wading in the water
    wading in the water
    Posts:17
    Avatar

    --
    09-21-2012 09:18 AM
    I got it to clear out with an After Update Trigger. Appreciate the suggestion! Never had more than one calendar field to worry about it, so never saw that occur before.

    Have a great weekend!
    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