Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] MySQL Update Query - What am I doing wrong?
#9
Brandon,

Alas, I figured out the problem. I noticed that in all the exceptions I was getting, the selectedindex value was being refered to as "ListViewItem={12}" but never the actual value of "12". So I removed the .ToString and used .Text instead and viola - it worked. Also, the adapter wasn't needed so I removed it. The query still executed without it.

SO HERE'S THE SOLUTION:

[code2=vbnet].Parameters.AddWithValue("@ccID", CInt(ListViewCard.SelectedItems(0).Text))[/code2]

Thank you so very much, I really appreciate the help.
//Kismet


Messages In This Thread
Re: MySQL Update Query - What am I doing wrong? - by kismetgerald - 10-17-2012, 11:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How can I read a link from mysql databse??? mnxford 9 32,852 04-12-2013, 06:27 PM
Last Post: brandonio21
  How do I use Listview to delete MySQL DB records kismetgerald 10 33,756 11-28-2012, 05:19 PM
Last Post: brandonio21
  How do I fill my form with MySQL data based on Combobox? kismetgerald 8 26,571 10-14-2012, 09:05 PM
Last Post: brandonio21
  Help with creating an INSERT statement using MySQL kismetgerald 4 16,694 08-30-2012, 03:03 PM
Last Post: brandonio21
  How to write string query on multiple lines kismetgerald 1 8,924 08-29-2012, 04:01 PM
Last Post: brandonio21
  VB.Net Query Builder Problems. Moldraxian 2 12,443 08-17-2012, 05:33 AM
Last Post: Moldraxian
  MySQL Database Issue Moldraxian 7 28,948 08-13-2012, 08:58 PM
Last Post: brandonio21
  MySql Database Queries in VB.Net Moldraxian 6 22,250 07-26-2012, 03:44 PM
Last Post: Moldraxian
  How to Package MySql Connector and MySql Program? Moldraxian 3 14,702 07-20-2012, 12:23 PM
Last Post: brandonio21
  MySql Help Blackrobot 3 14,543 04-06-2012, 03:49 AM
Last Post: xolara

Forum Jump:


Users browsing this thread: 1 Guest(s)