PDA

View Full Version : Multiple recordsets on same page???


parallon
05-12-2006, 10:49 PM
Hello all. I have an application in which I have various modules each of them with the same permissions (View, Add, Edit, Delete). Well, I have a table in my DB which has a separate row for each user for each module. Below is kinda what the DB table looks like:

User ID Module View Add Edit Delete
--------------------------------------------------------------------------------
User 1 Module 1 (y/n) (y/n) (y/n) (y/n)
User 1 Module 2 (y/n) (y/n) (y/n) (y/n)
User 1 Module 3 (y/n) (y/n) (y/n) (y/n)
User 1 Module 4 (y/n) (y/n) (y/n) (y/n)
User 2 Module 1 (y/n) (y/n) (y/n) (y/n)
User 2 Module 2 (y/n) (y/n) (y/n) (y/n)
User 2 Module 3 (y/n) (y/n) (y/n) (y/n)
User 2 Module 4 (y/n) (y/n) (y/n) (y/n)

Well, I have a Page with each of the modules along the Y-Axis and the permissions along the X-Axis and checkboxes under each permission to show whether the user has that permission for that module or not. I have set up a separate recordset for each module that are similar to the following:

SELECT Add, Delete, Edit, Modules, UserID, View
FROM Module_Rights
WHERE UserID = 'MMColParam' AND Modules = 'Timecard'

I am using the following code on the checkboxes to check the status of the DB:

<input NAME="cbxTcView" TYPE="checkbox" ID="cbxTcView" VALUE="Yes" <% If (rsTimecard.Fields.Item("View").Value) = True Then %><% Response.Write (" checked")%><% else %><% Response.Write ("")%><% End If %>>

All checkboxes worked fine when I tested with one module and all permissions (1 recordset), but the minute I try to add a different module using the corresponding recordset, I get the following error:

Error Type:
ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/timesheet/Admin/Module_Admin_Results.asp, line 286

Does anybody have any suggestions?

Thanks in advance,

Parallon