Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Delete user from aspnet_users table

Delete user from aspnet_users table

Scheduled Pinned Locked Moved ASP.NET
asp-nethelptutorial
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mylogics
    wrote on last edited by
    #1

    hi all i have shown all of my existing users in a griedview from aspnet_users table. now i want to delete user on delete command but on when i tried to do this i got error. plz guide me....

    B 1 Reply Last reply
    0
    • M mylogics

      hi all i have shown all of my existing users in a griedview from aspnet_users table. now i want to delete user on delete command but on when i tried to do this i got error. plz guide me....

      B Offline
      B Offline
      Brij
      wrote on last edited by
      #2

      Please post the error details and the code segment where the error is generated.

      Cheers!! Brij

      M 1 Reply Last reply
      0
      • B Brij

        Please post the error details and the code segment where the error is generated.

        Cheers!! Brij

        M Offline
        M Offline
        mylogics
        wrote on last edited by
        #3

        I got following error as soon as tried to delete a user...

        The DELETE statement conflicted with the REFERENCE constraint
        "FK__aspnet_Me__UserI__1B0907CE".
        The conflict occurred in database "Sitname",
        table "dbo.aspnet_Membership", column 'UserId'.
        The statement has been terminated.

        B 1 Reply Last reply
        0
        • M mylogics

          I got following error as soon as tried to delete a user...

          The DELETE statement conflicted with the REFERENCE constraint
          "FK__aspnet_Me__UserI__1B0907CE".
          The conflict occurred in database "Sitname",
          table "dbo.aspnet_Membership", column 'UserId'.
          The statement has been terminated.

          B Offline
          B Offline
          Brij
          wrote on last edited by
          #4

          You can not delete a user just from deleting the row from aspnet_users table,Because there is a tight assoiation with other tables.First you need to understand the apnet membership schema,then you will be able to know how to a user from database directly. Or you can use the inbuild function of aspnet membership api to delete a user from application. But if you want to delete from database directly, it will better if you ask in database forum.

          Cheers!! Brij

          M 1 Reply Last reply
          0
          • B Brij

            You can not delete a user just from deleting the row from aspnet_users table,Because there is a tight assoiation with other tables.First you need to understand the apnet membership schema,then you will be able to know how to a user from database directly. Or you can use the inbuild function of aspnet membership api to delete a user from application. But if you want to delete from database directly, it will better if you ask in database forum.

            Cheers!! Brij

            M Offline
            M Offline
            mylogics
            wrote on last edited by
            #5

            thanks...

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups