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!

Question SQL validation defaults to success on sql failure
Last Post 04-08-2010 01:26 PM by Chad Nash. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
JamesCUser is Offline
skipping stones
skipping stones
Posts:14
Avatar

--
03-31-2010 01:42 AM

    While debugging my sql validation on a question, I noticed that if there is an error in the sql validation, then the default is to let the form proceed successfully.

    This is also the way it is documented.

    "The SQL query should return one column called IsValid. If the column returns 0 or False then the validation error message will be thrown, anything else and the user can continue."

    So anything else can for instance be a failure on that validation execution which will let the data be posted.

    IMHO this is the wrong way round. Success should be criteria for user to continue and anything else should generate an error.

    James.

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

    --
    03-31-2010 06:55 AM
    HI, can you post your SQL validation script here?
    If "IsValid" = 0, that means that it will throw the error; if "IsValid" = 1, then it will pass validation. So in your script, if it's valid, return "IsValid" = 1; else return "IsValid" = 0. If you post your script here, I can check it out and get it to work for you since I've done this numerous times before. -- David
    JamesCUser is Offline
    skipping stones
    skipping stones
    Posts:14
    Avatar

    --
    03-31-2010 08:37 PM
    Here is the script. My comment came not as a result of the script, but when my dnn account did not have rights to execute the procedure the validation anyway passed on the form.

    CREATE PROCEDURE [dbo].[IsValidAccountName]

    @AccountName nvarchar(15)
    AS
    BEGIN
    -- Script called by Manu DNN user registration form question event
    -- to see that the account name is valid and available.
    -- JC 26.3.2010

    SET NOCOUNT ON;

    SELECT CASE
    WHEN @AccountName in (Select AccountName From Registrations) THEN 0
    WHEN LEN(@AccountName) < 5 THEN 0
    WHEN @AccountName LIKE '%[^0-9,a-z]%' THEN 0
    ELSE 1
    END
    AS IsValid

    END
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    04-08-2010 01:26 PM
    Hi James,

    Thanks for your feedback. Ultimately (either way) the SQL/Stored Procedure should take into account and trap or catch if an error that might occur. I can understand your cause for concern though and will review this for future updates.

    -Chad
    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