Field "contains" failure to show all users that match
Last Post 10-26-2009 07:51 AM by Robb Bryn. 5 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
Robb BrynUser is Offline
going with the flow
going with the flow
Posts:74
Avatar

--
10-22-2009 11:18 AM

    We are tracking down a problem where users register with Dynamic Registration and check a series of values in a group checkbox (which is stored in the DNN Profile table as "value, value, value") 

    When I do a search based on the values using the "contains" it never shows the correct number of results.  This problem appear to be limited to that feld search.

    Doing a SQL profile trace I get the following commands

    exec dbo.DataSprings_RetrieveDNNUserProfileData3 @PortalID=0,@RoleFilter=N' Where UserID In (Select UserID from dbo.UserRoles Where (ExpiryDate >= GetDate() OR ExpiryDate Is Null) AND (EffectiveDate <= GetDate() OR EffectiveDate Is Null) AND RoleID  IN (4,3,5 ))',@LimitResults=N' TOP 1000',@Authonly=0

    which returns 769 records.  based on that recordset the filter for "Field contains value X" should then filter down to about 30 records .  It's returning 2.

    Apparently this filtering is done inside the module based on the total records returned from the above stored proc.  Is there anyway to see what is *actualy* being filtered so we can determine the real problem?

    Robb BrynUser is Offline
    going with the flow
    going with the flow
    Posts:74
    Avatar

    --
    10-22-2009 11:25 AM
    forgot to add.... with debug on it does show the correct "filter" and it shows the correct results when I apply that filter to the original Stored Proc result set... the problem is within the module.

    [BusinessCategories] like '%Builders (Residential & Commercial)%'
    and run....

    SELECT U.Username, U.FirstName, U.LastName, UserRoles.ExpiryDate, UserProfile.PropertyValue, UserProfile.PropertyText, PropertyDefinitionID
    from dbo.[Users] U
    INNER JOIN UserProfile ON U.UserID = UserProfile.UserID
    INNER JOIN
    UserRoles ON U.UserID = UserRoles.UserID
    Inner Join dbo.[aspnet_users] as au on au.Username = U.UserName
    Inner Join dbo.[aspnet_membership] am on au.UserID = am.UserID
    Where propertydefinitionid = 47 and PropertyValue like '%Builders (Residential & Commercial)%' and UserRoles.Expirydate >= getdate()
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    10-23-2009 07:51 AM
    HI, what version of DUD are you running? We are working on a new DUD version with numerous enhancements and faster search capabilities. -- David
    Robb BrynUser is Offline
    going with the flow
    going with the flow
    Posts:74
    Avatar

    --
    10-26-2009 05:33 AM
    2.50.22 is the release that we are running.
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    10-26-2009 07:40 AM
    Hi, how many users do you have in your DNN website? I noticed that your query is TOP 1000. Can you change this to 0? That way, there's no filtering. The problem is that in the version of DUD you are using, a TOP 1000 will mean it returns the first 1000 rows and then does the query to search based on those 1000 rows. Hence, some will be missing from the query. Our next release that we're working on, the query has been changed so that the it runs the query first and then filters on the rows returned by the query. -- David
    Robb BrynUser is Offline
    going with the flow
    going with the flow
    Posts:74
    Avatar

    --
    10-26-2009 07:51 AM
    Gotcha... that fixed the problem.


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