TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Josue Vega
NA
7
1.5k
Add ID to listbox pass those values to a multi update query
Oct 30 2014 3:35 PM
Hi guys, First before start I'm new to c# , MySQL, visual studio.
I have a table 2 Tables
table #1 | shipment
ShipmentID
VendorID
table #2 | container
ContainerID
ContainerStatus
ShipmentID
ShipDate
ShipBy
1
Closed
1
Current_TimeStamp
User
1. I fill a combobox with data ( 1, 2, 3, 4, 5) as ContainerID run a insert in table 1 and after returns a shipmentid
2. then I add multiple values to a listbox: shiplist which I pass to a label "Shipping being made for" + (1,2,3,4,5) using String.Join(",", shiplist.values) to shipmadelist_lbl which pass in this format : (1,2,3,4,5)
3. I want to update each container in the listbox using :
UPDATE ewaste.container SET ContainerStatus='Shipped', ShipmentID='" + this.lastid_show_txt.Text + "', ShipDate=CURRENT_TIMESTAMP, ShippedBy='" + Properties.Settings.Default.LoggedUser + "'
WHERE ContainerID IN '" + this.
shipmadelist_lbl
.Text + "'
but I receive a error I took a printscreen of the error with the form
MySql Erro snapshot
I need more information I attached the shipment.cs (code only)
Shipping_Cs
Reply
Answers (
5
)
Daily Devotional app
how to get database values on selected item of combobox