Not sure why you are why you stop one item short of the list count.
You should replace this code
for (int i = 0; i < cblCandidateName1.Items.Count-1; i++)
{
if (cblCandidateName1.Items[i].Selected ==true)
{
strcbl1 = strcbl1 + cblCandidateName1.Items[i].Value.ToString() + ",";
}
}
with
foreach (object checkedItem in cblCandidateName1.CheckedItems)
{
strcbl1 += String.Format("{0},", checkedItem.ToString());
}
You should probably also trim the string before adding it to the database
InsertScheduleCommand.Parameters.AddWithValue(@"strCID", strcbl1.TrimEnd(','));
That said, it is a pretty bad design to add comma separated string to a column to a database. You would probably be better of if you normalized your database.
In such a case, each item in the listbox would correspond to one row in a separate table.
Wikipedia: Database normalization[
^]
Database Normalization Basics[
^]
3 Normal Forms Database Tutorial[
^]