I have a checkedlistbox that is being generated by a datatable at form load. It contains a list of author names as my form is about adding books. A single book could have one or more authors, so that is the case.
What it must do is when I add a book and there is two author name checked, then it will store in my database which will give two rows, same book title but different author.
I assume that it needs a for loop. This is my line of code for the checkedlistbox.
cmd.Parameters.Add("@authorname", SqlDbType.NVarChar).Value = authorclb.SelectedItem;