nested updates, how?

Results 1 to 2 of 2

Thread: nested updates, how?

  1. #1
    Join Date
    Dec 1969

    Default nested updates, how?

    Hi, <BR>my task is for each new subfolder set the same accessrights for this as its parent folder.<BR><BR>My problem is that I&#039;d like to do something like this in asp:<BR>get all users with access to parent from table1<BR> for each userid<BR> get accesslevel<BR> add new record to table1(userid,accesslevel,newsubfolderid)<BR> loop<BR><BR>I try this here:<BR>sqlGr="select * from tGroupAccess where ga_FolderId="&parentId<BR>Set rsGr=server.createobject("ADODB.Recordset")<BR>rsG sqlGr, oConn, adOpenKeyset<BR> if not rsGr.EOF then<BR> do while not rsGr.EOF<BR> accl=rsGr("ga_Accesslevel")<BR> gnm=rsGr("ga_Groupname")<BR> With rsGr <BR> .AddNew<BR> .Fields("ga_Accesslevel")=accl<BR> .Fields("ga_Groupname")=gnm<BR> .Fields("ga_FolderId")=newFolderId<BR> .Update<BR> End with<BR> rsGr.movenext<BR> rsGr.loop<BR> end if<BR><BR>what have I misunderstood?<BR>:)<BR><BR>gronske

  2. #2
    Join Date
    Dec 1969

    Default What doesn't work?

    Does it try to loop forever?<BR><BR>If so, try using adOpenStatic, to see if that makes a difference. (Probably won&#039;t...just guessing.)<BR><BR>Worst come to worst, get all the existing records into an array (use GETROWS) and then process only the array.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts