Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I use Listview to delete MySQL DB records
#5
Sorry for the limited post, I'm about to head to bed. I was thinking something like this:
[code2=vbnet]For Each item As ListViewItem In ListView1.SelectedItems
Dim ccNumber As String = item.SubItems(0).ToString
Dim ccExpireMonth As String = item.SubItems(1).ToString
Dim ccExpireYear As String = item.SubItems(2).ToString
Dim nameCompany As String = item.SubItems(3).ToString

Dim sqlQuery As String = "DELETE FROM cc_master WHERE ccNumber='" & ccNumber & "', " & _
"ccExpireMonth='" & ccExpireMonth & "', ccExpireYear='" & ccExpireYear

'Here we would run the query

Next[/code2]

I can further explain it later if you want me to!
My Blog | My Setup | My Videos | Have a wonderful day.


Messages In This Thread
Re: How do I use Listview to delete MySQL DB records - by brandonio21_phpbb3_import2 - 11-25-2012, 10:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Open Zip files into a listview box Worf 2 13,394 09-20-2014, 10:14 AM
Last Post: Worf
  How can I read a link from mysql databse??? mnxford 9 31,015 04-12-2013, 06:27 PM
Last Post: brandonio21
  Listview and Krypton help brco900033 1 9,917 11-01-2012, 01:04 AM
Last Post: Snake_eyes
  [SOLVED] MySQL Update Query - What am I doing wrong? kismetgerald 11 40,437 10-18-2012, 07:16 PM
Last Post: brandonio21
  How do I fill my form with MySQL data based on Combobox? kismetgerald 8 25,267 10-14-2012, 09:05 PM
Last Post: brandonio21
  Read and delete lines brco900033 6 21,344 09-16-2012, 09:38 AM
Last Post: brandonio21
  Help with creating an INSERT statement using MySQL kismetgerald 4 15,985 08-30-2012, 03:03 PM
Last Post: brandonio21
  MySQL Database Issue Moldraxian 7 27,780 08-13-2012, 08:58 PM
Last Post: brandonio21
  MySql Database Queries in VB.Net Moldraxian 6 21,043 07-26-2012, 03:44 PM
Last Post: Moldraxian
  How to Package MySql Connector and MySql Program? Moldraxian 3 14,025 07-20-2012, 12:23 PM
Last Post: brandonio21

Forum Jump:


Users browsing this thread: 1 Guest(s)