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!

How to throw error if record not inserted
Last Post 05-01-2009 10:56 AM by Nathan Botts. 5 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Nathan BottsUser is Offline
wading in the water
wading in the water
Posts:20
Avatar

--
04-28-2009 10:24 AM

    I have a form that appears to successfully submit, but doesn't actually update the table if some of the data entered does not match the correct data type.

    I am trying to control most of this through regular expressions, but is there a straight forward way to let the user know if a record was not inserted?

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    04-28-2009 11:05 AM
    HI Nathan, the only possible way I can think of is to have a redirection completion event where you pass the user automatically to another page. That way you retrieve the userid and also perform a select query statement on your table to retrieve the last record on your table that belongs to the userid and then depending on the datetime stamp, will set a drop down combox entry to either success or failure. Something like this would work. But your table will need to include the userid as well as a datetime that the entry was written to compare to. -- David
    Nathan BottsUser is Offline
    wading in the water
    wading in the water
    Posts:20
    Avatar

    --
    04-29-2009 06:56 AM

    Hi David,

     

    You mean I can't just push a button?

     

    As an in between are there any examples of a custom SQL validation script that would do a similar trick?

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    04-30-2009 06:57 AM
    Nathan, the problem with your scenario is that the SQL form completion event must trigger in order for the SQL to try and insert the record (success or failure). So how do you warn the user? Best and most efficient way in my opinion is through a store procedure:

    Create a store procedure to accept the token values, check for datatype/validity of the tokens and if they are valid, insert the record

    within the store procedure, also call the "xp_sendmail" to send the user email telling them if the record was inserted successfully or it failed.

    Check out the link: http://msdn.microsoft.com/en-us/lib...89505.aspx
    concerning how to use xp_sendmail

    -- David
    David To HostUser is Offline
    going with the flow
    going with the flow
    Posts:54
    Avatar

    --
    05-01-2009 10:48 AM

    HI Nathan, check out this forum on SQL validation. I guess you can create a stored procedure to check for valid data and if it's valid, return a 1 and if not valid, return a 0. Then based on the return value, to warn the user that their data has been inserted or not.  -- David

    Nathan BottsUser is Offline
    wading in the water
    wading in the water
    Posts:20
    Avatar

    --
    05-01-2009 10:56 AM
    Hi David,

    That definitely looks like the type of fail-safe functionality I am trying to incorporate. I'll dig in to your suggestion and see if I can't get something outlined.

    Thanks, Nathan
    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