Forums
>
Product Discussion - DotNetNuke Modules
>
Dynamic Registration
SQL validation
Last Post 08-13-2012 04:51 AM by Ryan Bakerink. 2 Replies.
Author
Messages
toddgdaugherty
skipping stones
Posts:13
08-10-2012 10:11 PM
Any idea why this SQL validation does not return false? It doesn't return anything.
Thanks!
DECLARE @DATE varchar(10)
SET @DATE = '9/31/2012'
IF ISDATE(@DATE) = 1
PRINT 'IsValid'
ELSE
PRINT 'False'
toddgdaugherty
skipping stones
Posts:13
08-12-2012 10:18 PM
BTW - this returns a value (false) in a SS Management Studio query but in a Dynamic Registration "SQL validation" or in a host > SQL query it returns nothing. (
The query did not return any data.
)
Is there something I'm missing here?
Thanks!
Todd
Ryan Bakerink
river guide
Posts:1900
08-13-2012 04:51 AM
Hello Todd,
There are a couple rules when it comes to utilizing the SQL Validation feature withing Dynamic Registration:
1.) A column or column alias must be returned that is named "IsValid"
2.) The returned column value must be "False" for failed validation or "True" for a completed validation.
Here's an example of a working SQL Validation query:
----------------------------------------------------------------------------
DECLARE @COUNT INT
SET @COUNT = (SELECT COUNT(*) FROM USERS WHERE UserName like '%$(UserName)%')
DECLARE @BOOL NVARCHAR(200)
IF @COUNT > 0
BEGIN
SET @BOOL = 'True'
SELECT @BOOL As IsValid
END
ELSE
BEGIN
SET @BOOL = 'False'
SELECT @BOOL As IsValid
END
----------------------------------------------------------------------------
Now this validation query may be used in a scenario such as if a User exists with the provided Username from the form. This is only an example query.
Let me know if you have any questions.
Thanks,
Ryan
Forums
>
Product Discussion - DotNetNuke Modules
>
Dynamic Registration
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