I have a checklistbox that I have been working on and I need to commit the changes made to those checkstates to a sql table, removing rows where the checkbox is not checked and adding rows where the checkbox is checked (assuming the checkstate actually changed).
Instead of doing a foreach loop for each item in the checklistbox and if the checkstate changed, executing a sql statement, is it possible to pass other objects to sql and have it act on that object? Like a DataTable or something that is serialized or something that I can pass to a sproc?
I don't necessarily mind using the loop and honestly it's not a screen people would be using much so I doubt it would cause much network traffic anyway, but who knows...I'd rather do it right the first time than to have it cause problems later and not understanding why.
Any suggestions?