asp.net membership and profile classes

karahana

Newcomer
Joined
Oct 26, 2005
Messages
2
Hi there!

i have a little problem...

The membership class: where should i store a user's first name and last name?

i thought of storing it in the user profile, but there is a problem:
lets say the admin wants to see all the users in his site in a gridview,
and to see the property "IsUserLocked" (aspnet_users table), together with the user's first name (which is stored in the aspnet_profile table).

its not the same table... and with the structure of aspnet_profile u cant do a "SELECT" statement....
what can i do then?

thank you for your help.
 
I'm not 100% sure I understand what your asking, but I'll give it a shot. If you have user information stored in two, or more different tables, then you can perform a query on the database that joins the information together and displays it as one record. Barring you have a common indentifier in each table that will link the two together. Using your example....

Code:
select
    t1.UserId,
    t1.Permission
    t2.IsUserLocked
from
    aspnet_profile t1,
    aspnet_users t2
where
    (t1.UserId = t2.UserId)
 
Unfortunately

Unfortunately, aspnet_profile isn't built that way.

its built with a string column of XML data and another binary column that both hold the entire propreties for a single user... in one row identified by UserId, u cant seperate those properties ( for example UserFirstName) by an ordinary SELECT statement (OR IS THERE A WAY?)
 
Back
Top