Home/ASP.NET Forums/Starter Kits and Source Projects/Personal Site Starter Kit/My Godaddy upload almost there need help with SQL

My Godaddy upload almost there need help with SQL RSS

4 replies

Last post Feb 25, 2007 10:07 AM by johntboyle

  • johntboyle johntboyle

    None

    0 Points

    16 Posts

    Re: My Godaddy upload almost there need help with SQL

    Feb 25, 2007 10:07 AM|johntboyle|LINK

    Also add this into the into Query Analyzer to add roles and the it all works.

    /*

    Please change the YOUR_USERNAME_HERE text to your username you entered in when you registered to your PWSK.

    */

    DECLARE

    @userID uniqueidentifier,

    @roleID uniqueidentifier,

    @userName nvarchar(256)

    SET @userName = 'YOUR_USERNAME_HERE'

    SET @userID = (SELECT TOP 1 UserId FROM aspnet_Users WHERE UserName = @userName)

    UPDATE aspnet_Membership SET IsApproved = 1 WHERE UserId = @userID

    SET @roleID = (SELECT RoleId FROM aspnet_Roles WHERE RoleName = 'Administrators')

    INSERT INTO aspnet_UsersInRoles (RoleId, UserId) VALUES (@roleID, @userID)

  • ‹ Previous Thread|Next Thread ›