CheckBoxList recommendations when updating to SQL

D

dan_williams

I have an ASP.NET web page with a CheckBoxList which users can select
multiple checkboxes and select to save, which inserts a record/row for
each checkbox ticked into an SQL database.

What is the recommended practise when doing this?

Is it better/easier to delete all existing records, and then reinsert
new records for checkboxes checked, or to get my application to
identify which checkboxes have since been unticked and delete SQL rows
for them, and then just insert new rows for newly checked boxes? If
that makes any sense at all?!

I am using a stored procedure to do this. Should I pass a comma
delimited list of values of Checkboxes ticked to my stored procedure
which one then only fire the once, or create a stored procedure that
would need to be executed each time for every tick box selected?

Can anyone point me in the direction of any recommended methods of
dealing with multiple check boxes and batch updates to SQL?

Thanks in advance for any suggestions

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top