<% set con=server.createobject("ADODB.connection") scon=connectionstring set rs=server.CreateObject("ADODB.Recordset") dim tmpitemcode(100),tmpqty(100),i,j,maxrec maxrec=request.form("maxrec") maxrec=cint(maxrec) j=1 do while j<=maxrec fitem="" fitem="itemname"&j fqty="" fqty="qty"&j tmpitemcode(j)=right(Request.Form(fitem),4) tmpqty(j)=Request.Form(fqty) j=j+1 loop sec_code=session("section_cd") user_id=session("ecode") sql1="select isnull(max(request_id)+1,1) as requestid from issue" rs.Open sql1,scon requestid=rs("requestid") rs.close issue_pending="Y" con.Open scon j=1 do while j<=maxrec if tmpitemcode(j)<>"" then 'sql="insert into drawing_authority (SEC_CODE,Auth_EMP_CODE) values ('"&tmpqty(j)&"','"&tmpitemcode(j)&"')" sql="update dopt set section= '"&tmpqty(j)&"' where EMP_CODE='"&tmpitemcode(j)&"' " con.Execute sql on error resume next end if j=j+1 loop con.close %>
authorised employees have been added
Back to Menu