Thursday, March 29, 2012

Error when trying to delete user

I created many test users in my application while trying to get a custom registration process to work, and now I would like to delete those users so they don't use up space in my database. When I go into the aspnet_Users table and try to delete a user, it gives me the following error:

----------

DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__aspnet_Me__UserI__0F975522'. The conflict occurred in database 'DB_83996', table 'aspnet_Membership', column 'UserId'.

DELETE FROM [DB_83996].[dbo].[aspnet_Users] WHERE 1=0 OR ( [UserId] = '{7E864A07-6FE8-46EF-A2B8-354646D57C76}' )

----------

I don't know much about SQL statements, so is that statement it gave me the statement I need to use to delete that particular user? If not, how would I go about deleting these users I don't need anymore?

Thanks so much. :)

your table "aspnet_Membership" contains records that reference the user record you are trying to delete.

you will need to delete those records first.

|||Thanks. I could have sworn I tried that before because I knew those two tables were linked. Maybe it was something else I tried. Oh well. Thanks!!

No comments:

Post a Comment