<% 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),3) tmpqty(j)=Request.Form(fqty) j=j+1 loop con.Open scon j=1 do while j<=maxrec if tmpitemcode(j)<>"" then sql="update stock set qty_left= "&tmpqty(j)&" where ITEM_CODE='"&tmpitemcode(j)&"' " con.Execute sql end if j=j+1 loop con.close %>
Stock Updtated
Back to Menu