Have a question to see if this is possible or if there is another way to accomplish what i want to happen.using vb6/sql server2000
This is what i have so far.
first it goes and get some users roles(dependent on what dept you selected from cbo box)in sql, gets the team members from that dept and puts it into a recordset(this works fine)
then,
I want it to go into a loop for those team members in that list (do until eof) and get from file newrequest all req for people in that dept, puttin each record into rs.Requests.
as soon as it gets thru the first person, adding it to rs.requests, it bombs out, when reads the next user saying Operation not allowedwhen the object is open.
any ideas? thoughts? better ways to handle?
This is what i have so far.
first it goes and get some users roles(dependent on what dept you selected from cbo box)in sql, gets the team members from that dept and puts it into a recordset(this works fine)
then,
I want it to go into a loop for those team members in that list (do until eof) and get from file newrequest all req for people in that dept, puttin each record into rs.Requests.
as soon as it gets thru the first person, adding it to rs.requests, it bombs out, when reads the next user saying Operation not allowedwhen the object is open.
any ideas? thoughts? better ways to handle?
Code:
'QUERY SELECT Dept MEMBERS FROM I.T. ROLE IN SQL
strsql = "EXEC sp_getuserrole '" & Trim$(cboDept.Text) & "' "
rsdept.Open strsql, g_conn, adOpenStatic
'LOAD Dept MEMBERS FROM QUERY &PUT THEM IN CBODept
Do Until rsdept.EOF
strUser = rsdept(0)
strsql = "select * from newrequest where userid = '" & Trim$(strUser) & "' order by requestidno asc"
rsRequests.Open strsql, g_conn, adOpenStatic
rsdept.MoveNext
Loop