Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 22, 2013 09:52 PM by Touti
Feb 22, 2013 08:49 PM|LINK
When i use
to delete user form users table and the user have roles in roles table
i get this exception
The DELETE statement conflicted with the REFERENCE constraint "fk". The conflict occurred in database "app_data", table "Roles_table", column 'user_id'.
The statement has been terminated.
and thanks for your help
Feb 22, 2013 09:06 PM|LINK
Have you tried:
Feb 22, 2013 09:14 PM|LINK
Yes still none
Feb 22, 2013 09:19 PM|LINK
I'm assuming the Roles_table is a table you manually created in the same database as the membership tables, is that correct? If so, before you call the Membership.DeleteUser method, you'll need to delete all the records in the Roles_table where the userId
is equal to the id of the user you are deleting.
Hope this works :-)
Feb 22, 2013 09:24 PM|LINK
the table Roles is Created by the Membership Provider and i have no idea how i can access the data using EF
any Idea how i can access the Roles Using EF and delete related data?
Feb 22, 2013 09:33 PM|LINK
I just found this via googling ..., it may be relevant to your issue
Feb 22, 2013 09:52 PM|LINK
i use it tike this :
and the both roles and users table value deleted but the the value in webpages_membership table is not ?