Greetings,
I am trying to create page permissions based on groups using ASP, ADO, and
Access2000. This page adds users into groups, the users being picked from
a <select>. The <option> values on the page are of the form
userid::username (hence the split on "::"). There are only ever a few
users to add to the group, but the script times-out (default 90
seconds). The records are all updated correctly, but it seems I'm missing
something -- like I'm not closing something or I'm missing something subtle
about connections since it times-out and doesn't execute and exit as I
would expect.
So the question is: the page works, but can I make it return faster than
the default 90 seconds.
The full code:
if request.form("save") <> "" then
'get the group id
gid = Request.Form("ID")
'update the groupname if necessary
sql = "UPDATE proc_groups SET groupname = '" &
request.form("groupname")
sql = sql & "' WHERE ID = " & request.form("ID")
conn.Execute sql
'delete current user entries to avoid duplication
sql = "DELETE FROM proc_memberships WHERE gid = " & gid
conn.Execute sql
'get users selected from combo box
groupmembers = Request.Form("workingallowed")
'open empty recordset
sql = "SELECT * FROM proc_memberships WHERE false"
set grs = server.CreateObject("ADODB.recordset")
grs.Open sql,conn,3,3
'allow for multiple selections
grouparray = split(groupmembers,",")
'add users to group
for each group in grouparray
groupinfo = split(group,"::")
grs.AddNew
grs("gid") = gid
'add just the userid
grs("uid") = groupinfo(0)
grs.Update
next
grs.Close
set grs = nothing
response.write "<SCRIPT
LANGUAGE=""javascript"">window.opener.location.reload();
window.close();</SCRIPT>"
====================
Barry Von Ahsen
barry@c...