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!

Cannot get SQL Validation to fire
Last Post 02-23-2010 12:27 PM by David To. 7 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
The DadUser is Offline
skipping stones
skipping stones
Posts:9
Avatar

--
02-23-2010 09:52 AM

    I am using DR V2.6.0 and want to PREVENT duPlicate Displaynames.  I have created and tested a Stored Procedure which returns an IsValid column with a 1 or 0.  No matter what I enter in the Display field that's the shortname), validation never seems to fire!


    Enable Client Side Validation: is checked.  Enable Server Validation is also checked.


    I have enabled Custom SQL Validation Script

    Here is ny script:

    usp_ChkDisplayName '$(Display)'


    Do I need to add something?  Do I need to DEFINE IsValid? I tried this to no avail(What am I missing here?

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

    --
    02-23-2010 10:00 AM
    Can you state your stored procedure here? Also, turn on DEBUG MODE on your DR form. Then fill out everything and click on submit. You should see what gets processed. Find the SQL validation and copy / paste that to Host / SQL and see what it returns. -- David
    The DadUser is Offline
    skipping stones
    skipping stones
    Posts:9
    Avatar

    --
    02-23-2010 10:59 AM
    Here is the procesure, I am working on the debug.

    USE [bbcplayers]
    GO
    /****** Object: StoredProcedure [bbcplayers].[usp_ChkDisplayName] Script Date: 02/23/2010 14:45:25 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author:
    -- Create date: <2/20/2010>
    -- Description:
    -- =============================================
    ALTER PROCEDURE [bbcplayers].[usp_ChkDisplayName] (
    @DNText varchar(80))
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
    -- Insert statements for procedure here
    IF NOT Exists( SELECT DisplayName FROM dbo.Users
    WHERE DisplayName = @DNText)
    Select 1as IsValid
    ELSE Select 0 as IsValid

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

    --
    02-23-2010 11:14 AM
    HI, is that the exact copy of your stored procedure? In it, you have

    Select 1as IsValid

    Don't you need a space after the 1? Did you verify that there's no syntax error in the stored procedure?

    Also, since your stored procedure is named: bbcplayers.usp_ChkDisplayName (due to having a different schema than the default dbo object), try calling it from Dynamic Registration SQL validation with this instead:

    exec bbcplayers.usp_ChkDisplayName '$(Display)'

    Also, as a test, go to Host / SQL and hard-code in something valid like:

    bbcplayers.usp_ChkDisplayName 'ValidDisplayName'

    replacing ValidDisplayName with a valid/non-valid displayname to see if it returns a 1 or a 0 in the IsValid column. -- David
    The DadUser is Offline
    skipping stones
    skipping stones
    Posts:9
    Avatar

    --
    02-23-2010 11:35 AM
    Adding he bbcplayers to the USP did the trick!

    Hmm..this validation does not occur when leaving the fiels but after the Register or Update Registration button is presssed, right?

    Also, I think I need to account for Updates because the old displayname will always exists and prevent any updates if it is not changed. Another option may be to not allow updates on Displayname, though this may be too restrictive.
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    02-23-2010 11:55 AM
    Right, SQL validation is server side validation (happens on submit of the form). -- David
    The DadUser is Offline
    skipping stones
    skipping stones
    Posts:9
    Avatar

    --
    02-23-2010 12:00 PM
    Is there a token that contains the value of a firld (i.e. Displayname) before it is updated by the user?
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    02-23-2010 12:27 PM
    I don't believe you have to account for updates because when a user clicks on "Update Registration" or "Submit Registration", the SQL Validation will kick in first, determine if a Displayname exists and if it doesn't will allow the "Submit/Update Registration", otherwise, it won't allow it. -- David
    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