SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2007
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to connect aspnet_Users table to one of my own?

    I have used the ASP.NET 2.0 Configuration Tool to create membership/user accounts and roles.

    aspnet_Users contains a primary key, UserId (of data type, uniqueidentifier) and a few other fields about the user.

    Also, I want to store some more data about the users, e.g. address, telephone, and any other personal info.

    Would it be best to either add more fields to the aspnet_Users table or would it be better for me to create another table, say SiteUsers, that contains all their personal data and link the tables through a relationship, UserId?

    Any help would be appreciated, thanks

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,576
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Really depends on the nature of your application.

    If you need to access the data externally, you should probably create a separate table and relate it back to users. Now, if this is just going to show up in the site, you should probably use the ProfileProvider to handle this stuff.

    PS: moved to the ASP.NET forum where this question makes more sense.

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2004
    Location
    canada
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    like said, if you just need to store basic options, go with the profile provider.

    If you want more robust (and i say it IS a good idea to make a seprate table) then do it..

    I would advise from editing the table itself. Sure that might be easy, but what about all the stored proceudres and functions that talk to that usertable. you'll have to edit all of it now.

  4. #4
    SitePoint Enthusiast
    Join Date
    Sep 2007
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My site is very simple. It's a football prediction site and users will log on and submit a prediction (score, anytime scorer) on a weekly basis. There will also be a place for them to amend any personal details.

    So I have two tables that are directly associated with users, SiteUsers and Predictions. I need to somehow link SiteUsers to aspnet_Users. Is it as easy as creating a field within SiteUsers which is a foreign key of UserID.aspnet_Users?

    Are there any good web tutorials/books about Profile Provider or any relevant examples?

  5. #5
    SitePoint Guru Chroniclemaster1's Avatar
    Join Date
    Jun 2007
    Location
    San Diego, CA
    Posts
    784
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    to be honest a lot of the best stuff is available online just by Googling ".NET profile provider" Virtually anything on these boards your can learn a lot about, just by cruising the net.
    Whatever you can do or dream you can, begin it.
    Boldness has genius, power and magic in it. Begin it now.

    Chroniclemaster1, Founder of Earth Chronicle
    A Growing History of our Planet, by our Planet, for our Planet.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •