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. General Programming
  3. Visual Basic
  4. how can i delete a listview item fetched from a database???

how can i delete a listview item fetched from a database???

Scheduled Pinned Locked Moved Visual Basic
databasequestion
5 Posts 5 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.
  • H Offline
    H Offline
    Hakeem Celis Samuddin
    wrote on last edited by
    #1

    i'm working on a project and i'm having trouble with deleting items on the listview. the situation is, if i delete item from the listview it should be deleted on the db too. thanks in advance

    L Z K M 4 Replies Last reply
    0
    • H Hakeem Celis Samuddin

      i'm working on a project and i'm having trouble with deleting items on the listview. the situation is, if i delete item from the listview it should be deleted on the db too. thanks in advance

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You probably need to add some code to do the deletion.

      1 Reply Last reply
      0
      • H Hakeem Celis Samuddin

        i'm working on a project and i'm having trouble with deleting items on the listview. the situation is, if i delete item from the listview it should be deleted on the db too. thanks in advance

        Z Offline
        Z Offline
        ZurdoDev
        wrote on last edited by
        #3

        It's not automatic, you have to write code to do it. Where are you stuck? The simple way is to use the SqlConnection and SqlCommand objects. Tons of examples online.

        There are only 10 types of people in the world, those who understand binary and those who don't.

        1 Reply Last reply
        0
        • H Hakeem Celis Samuddin

          i'm working on a project and i'm having trouble with deleting items on the listview. the situation is, if i delete item from the listview it should be deleted on the db too. thanks in advance

          K Offline
          K Offline
          KreativeKai
          wrote on last edited by
          #4

          This might help: http://stackoverflow.com/questions/19441239/how-listview-delete-data-in-database[^]

          Lost in the vast sea of .NET

          1 Reply Last reply
          0
          • H Hakeem Celis Samuddin

            i'm working on a project and i'm having trouble with deleting items on the listview. the situation is, if i delete item from the listview it should be deleted on the db too. thanks in advance

            M Offline
            M Offline
            MBV Media
            wrote on last edited by
            #5

            I would say the easiest way is to first delete the unneeded data from the database then re-generate the listbox content from the remaining data.

            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