%@ Language=VBScript %> <% Option Explicit %> <% Dim oConn, oRs1, sSql 'DB Connection Variables %> <% Set oConn = Server.CreateObject("ADODB.Connection") %> <% oConn.Open Application("CONNSTR") 'Init DB Connection %> <% '------------ Init Page Variables ------------ %> <% Dim ProductID %> <% %> <% '------------ =================== ------------ %>
<% ProductID = Request.QueryString("p") sSQL = "update products set Status='Inactive', LastUpdate='" & Date() & "' where productid=" & ProductID %> <%=sSQL%> <% set oRs1 = Server.CreateObject("ADODB.Recordset") oRs1.Open sSQL, oConn, 3, 3 Response.Redirect "Products.asp?view=inactive" %>