Ok, I have spent the last few days trying to solve a problem I have. Here is the deal:

I have two database tables, one with reports (each report has a unique id)
and one table with authorization info (username and reportid) "user_perm" is that tables name.

On the page where the admin can set permissions for the users I want to do it like this:

I have a listbox where the admin select a username
then I need a repeater to be filled with two things for each row

1)A checkbox indicating wether or not this user has permission for the report

2)The name of the report

The name is fetched from the report database,(the repeater datasource but HOW ON EARTH DO I SOLVE IT WITH THE CHECKBOX??? I need some kind of sql query for each "repeat" that make a "select reportid from user_perm where username = listbox1.text" and then I have to check the returned table if it has 1 or 0 returning rows, indicating

But how do I solve this in the code? And more important, how do I update the user_perm db when I say have checked two more boxes and want to add those user_name-report_id to the report_perm table??? I thought about mirror the data to a static datatable, make changes there and then upload changes, but I don't know how to do it when the repeater is involved.


Any kind of info, suggestions is extremly helpful, cause this is really bugging me.. to say the least

kind regards
Henrik