Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

sql server and membership provider
Hello all,
I need help with sql server which i was wondering if someone can shed
some light on my problem

The problem:
Hello all,
I need help with sql server which i was wondering if someone can shed
some light on my problem

The problem:
i am using .net 2.0 membership provider interface to provide a
membership in my website...now i also am using the sql server 2005 for
the backbone of the site..now when a new user is created their
information is saved into asp_ membership and their userid is
automactially saved into another table called asp_users...now these are
defaults by membership provider...what i would like to do is to create
another table which i have called "Rank" and i would a column in this
"rank" table that would keep the user ids, now i have noticed that the
asp_user.UserId has a releationship with asp_Membership.userId so when a
new user is created asp_user.Userid automactially gets updated..i have
created a colum called Rank.UserId which has a relationship with
asp_users.userid and asp_membershi.Userid but it doesnot get updated
automatically when a new user is created...what can i do so i can have
this table "Rank" also gets updated automactially as soon a a new user
is created or a user has been deleted...just like asp_users gets updated
..thanks in advance

---
Best Regards
Amir

---
Best Regards
Amir

*** Sent via Developersdex http://www.droptable.com ***

Report this thread to moderator Post Follow-up to this message
Old Post
Amir Ghezelbash
02-19-06 08:23 AM


Re: sql server and membership provider
Amir Ghezelbash (amir_gh99@hotmail.com)  writes:
> The problem:
> i am using .net 2.0 membership provider interface to provide a
> membership in my website...now i also am using the sql server 2005 for
> the backbone of the site..now when a new user is created their
> information is saved into asp_ membership and their userid is
> automactially saved into another table called asp_users...now these are
> defaults by membership provider...what i would like to do is to create
> another table which i have called "Rank" and i would a column in this
> "rank" table that would keep the user ids, now i have noticed that the
> asp_user.UserId has a releationship with asp_Membership.userId so when a
> new user is created asp_user.Userid automactially gets updated..i have
> created a colum called Rank.UserId which has a relationship with
> asp_users.userid and asp_membershi.Userid but it doesnot get updated
> automatically when a new user is created...what can i do so i can have
> this table "Rank" also gets updated automactially as soon a a new user
> is created or a user has been deleted...just like asp_users gets updated
> ..thanks in advance

I know zero about ASP .Net, and even less about any membership provider,
but it sounds as if you want a cascading foreign key:

ALTER TABLE Ranks ADD CONSTRAINT fk_rank_userid (UserId)
REFERENCES asp_Membership (userId) UPDATE ON CASCADE


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Report this thread to moderator Post Follow-up to this message
Old Post
Erland Sommarskog
02-19-06 02:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 04:48 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006