Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...I need a DNN/msSQL expertI need a DNN/msSQL expert
Previous
 
Next
New Post
10/1/2006 12:09 AM
 
I'm in the middle of moving to DNN4.3.5 and have found that with the changes to the User Profile tables I've broken a link to another webapp that uses the user database from DNN.  Under DNN3.2, I used the following SQL View (written by someone on the ASP.NET forum) to pull all the user profile data into a single View.  Now that I'm moving to 4.3.5 the user information is in a different format in the UserProfile table.  I was wondering if someone could get me started again with a msSQL View for DNN4.3.5 to pull the same information into a single table?

Thanks for the help....



Here is the SQL View I used with DNN3.2

CREATE VIEW dbo.vw_View_UserProfiles
AS
SELECT    
                     dbo.aspnet_Profile.UserId,
                     dbo.aspnet_Users.UserName,
                     dbo.aspnet_Users.LoweredUserName,
                     dbo.aspnet_Membership.Password,
                     dbo.aspnet_Membership.Email,
                     dbo.aspnet_Membership.LoweredEmail,

                     dbo.GetProfileElement('FirstName', dbo.aspnet_Profile.PropertyNames,
dbo.aspnet_Profile.PropertyValuesString) AS FirstName,

                     dbo.GetProfileElement('LastName', dbo.aspnet_Profile.PropertyNames,
dbo.aspnet_Profile.PropertyValuesString) AS LastName,

           ((dbo.GetProfileElement('FirstName', dbo.aspnet_Profile.PropertyNames,
dbo.aspnet_Profile.PropertyValuesString)) + ' ' + (dbo.GetProfileElement('LastName', dbo.aspnet_Profile.PropertyNames,
dbo.aspnet_Profile.PropertyValuesString))) AS FullName,

                     dbo.GetProfileElement('Street', dbo.aspnet_Profile.PropertyNames,
dbo.aspnet_Profile.PropertyValuesString) AS Street,

                     dbo.GetProfileElement('City', dbo.aspnet_Profile.PropertyNames,
dbo.aspnet_Profile.PropertyValuesString) AS City,

                     dbo.GetProfileElement('PostalCode', dbo.aspnet_Profile.PropertyNames,
dbo.aspnet_Profile.PropertyValuesString) AS PostalCode,

                     dbo.GetProfileElement('Country', dbo.aspnet_Profile.PropertyNames,
dbo.aspnet_Profile.PropertyValuesString) AS Country,

                     dbo.GetProfileElement('Phone', dbo.aspnet_Profile.PropertyNames,
dbo.aspnet_Profile.PropertyValuesString) AS Phone,

                     dbo.GetProfileElement('Fax', dbo.aspnet_Profile.PropertyNames,
dbo.aspnet_Profile.PropertyValuesString) AS Fax,

                    dbo.GetProfileElement('Cell', dbo.aspnet_Profile.PropertyNames,
dbo.aspnet_Profile.PropertyValuesString) AS Cell,

                    dbo.GetProfileElement('TimeZone', dbo.aspnet_Profile.PropertyNames,
dbo.aspnet_Profile.PropertyValuesString) AS TimeZone

FROM         dbo.aspnet_Profile INNER JOIN dbo.aspnet_Users
    ON dbo.aspnet_Profile.UserId = dbo.aspnet_Users.UserId INNER JOIN dbo.aspnet_Membership
    ON dbo.aspnet_Users.UserId = dbo.aspnet_Membership.UserId

WHERE
    dbo.aspnet_Membership.PasswordFormat = 0 AND
    dbo.aspnet_Membership.IsApproved = 1 AND
    dbo.aspnet_Membership.IsLockedOut = 0


 
New Post
10/1/2006 10:05 PM
 

Robert Tango
www.workcontrol.com
Custom Modules: UserManager|UserDirectory|UserImport|PortalSSO
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...I need a DNN/msSQL expertI need a DNN/msSQL expert


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out