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,988 09-20-2014, 10:14 AM
Last Post: Worf
  How can I read a link from mysql databse??? mnxford 9 33,063 04-12-2013, 06:27 PM
Last Post: brandonio21
  Listview and Krypton help brco900033 1 10,411 11-01-2012, 01:04 AM
Last Post: Snake_eyes
  [SOLVED] MySQL Update Query - What am I doing wrong? kismetgerald 11 43,370 10-18-2012, 07:16 PM
Last Post: brandonio21
  How do I fill my form with MySQL data based on Combobox? kismetgerald 8 26,738 10-14-2012, 09:05 PM
Last Post: brandonio21
  Read and delete lines brco900033 6 22,591 09-16-2012, 09:38 AM
Last Post: brandonio21
  Help with creating an INSERT statement using MySQL kismetgerald 4 16,771 08-30-2012, 03:03 PM
Last Post: brandonio21
  MySQL Database Issue Moldraxian 7 29,069 08-13-2012, 08:58 PM
Last Post: brandonio21
  MySql Database Queries in VB.Net Moldraxian 6 22,406 07-26-2012, 03:44 PM
Last Post: Moldraxian
  How to Package MySql Connector and MySql Program? Moldraxian 3 14,774 07-20-2012, 12:23 PM
Last Post: brandonio21

Forum Jump:


Users browsing this thread: 1 Guest(s)