%@ Language=VBScript %> <%Response.Buffer=True%> <%Updated = Request.QueryString("Updated") %> <% PageTitle = "SiteManager - Edit Supply Specification" %> <% PageID=300 %> <% Header %> <% Menu PageID %> <%' Main body of page goes here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <%SSpecEdit%> <%' End Of Main body ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <% Footer %> <% Sub SSpecEdit SpecID=Request.QueryString("SID") OpenConnection1 If Request.ServerVariables ("REQUEST_METHOD") = "POST" then If TRIM(Request.Form("txtSpecification"))<>"" then txtSpecification=dbReplace(Request.Form("txtSpecification")) nSupplyID=Request.Form("nSupplyID") SQL="UPDATE S_Specs SET txtSpecification='"& txtSpecification & "' WHERE SpecID =" & SpecID DB.Execute(SQL) Response.Redirect("Supply_Details.asp?SID=" & nSupplyID) Else error="A blank Specification cannot be saved!" End If Else SEL="SELECT nSupplyID,txtSpecification FROM S_Specs WHERE SpecID=" & SpecID SET rs=Server.CreateObject("ADODB.Recordset") rs.Open SEL,DB,1,3 txtSpecification=rs("txtSpecification") nSupplyID=rs("nSupplyID") rs.Close End If %>
<%= FormatDateTime(Date,1) %>
Edit Specification![]()
<%=error%>
<% error="" End If End Sub %>