T Hoecherl
asked on
Passing checklist to SQL stored procedure
I have a vb.net program that has a checked list box. When the program is run, the user can select one or more of the batches that are listed in the box. The program then runs and includes this code:
cmd.CommandText = "UPDATE PCT_PROD_BATCHING SET STATUS = 2, DATETIME_BATCHED = '" & dtDate & "' WHERE BATCH_NUMBER IN (" & String.Join(",", clbBatches.CheckedItems) & ")"
cmd.ExecuteNonQuery()
I get this error:
The multi-part identifier "System.Windows.Forms.Chec kedListBox " could not be bound.
Invalid column name 'CheckedItemCollection'.
I have used this same code in other applications and it has worked, but it is not working here. How can I correct the problem?
cmd.CommandText = "UPDATE PCT_PROD_BATCHING SET STATUS = 2, DATETIME_BATCHED = '" & dtDate & "' WHERE BATCH_NUMBER IN (" & String.Join(",", clbBatches.CheckedItems) & ")"
cmd.ExecuteNonQuery()
I get this error:
The multi-part identifier "System.Windows.Forms.Chec
Invalid column name 'CheckedItemCollection'.
I have used this same code in other applications and it has worked, but it is not working here. How can I correct the problem?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.