<%@ LANGUAGE="VBScript" %> <% ' ' ' add other request and modify then the action object 'same thing for the checklist update and confirm ' subs=Request.form("subs") subs_loc=request.form("subs_loc") question=Request.form("question") comments=Request.form("comments") instructions=Request.form("instructions") comments=Request.form("comments") weblink=Request.form("weblink") q_level=Request.form("q_level") a_text=Request.form("a_text") a_type=Request.form("a_type") a_units=Request.form("a_units") ' ' Open Database ' Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd sub replacebadstrings(variab) variab= Replace(variab,"""",""") variab= Replace(variab,"'","''") variab= Replace(variab,"<","<") variab= Replace(variab,">",">") end sub sub replacespace(variabl) variabl=Replace(variabl," ","") end sub %> Checklist update/insertion confirmation

Checklist Insertion/update Confirmation

<%' ' SQL statement to get the new sub_order and question and answer order ' if Request("subs_q")<>"" then '(this determines if it is an update or not) subs_q=cstr(Request("subs_q")) subs_q_order=cstr(Request("subs_q_order")) response.write("") else SQLtmt="select max(to_number(substr(subs_q,2),999)) nume, max(subs_q_order) ord from phoffline.checklist where subs='"& subs &"'" 'response.write(SQLtmt) 'select max(micho) from (select substr(subs_q,2) micho from phoffline.checklist where subs='SILICON') test 'problem sql recognizes 9>10 set RS=connection.Execute(SQLtmt) if isnull(RS("nume")) then old_subs_q="0" else old_subs_q=cint(RS("nume")) end if if isnull(RS("ord")) then subs_q_order="0" else subs_q_order=cint(RS("ord")) end if subs_q="Q"&(old_subs_q+1) subs_q_order=subs_q_order+10 'response.write(subs_q&"
"& subs_a) end if response.write("

SUBS="& subs &"

" & vbcrlf) response.write("SUBS LOCATION="& subs_loc &"

" & vbcrlf) response.write("QUESTION="&question) call replacebadstrings(question) response.write("

") response.write("CONDITION/COMMENTS="& comments ) call replacebadstrings(comments) Response.write("

" & vbcrlf) response.write("INSTRUCTIONS="& instructions ) call replacebadstrings(instructions) response.write("

" & vbcrlf) response.write("WEBLINK="& weblink &"

" & vbcrlf) response.write("Question Number(new)="& subs_q &"

" & vbcrlf) response.write("Question/Answer order(same)="& subs_q_order &"

" & vbcrlf) response.write("LEVEL="& q_level) call replacespace(q_level) response.write("

" & vbcrlf) response.write("ANSWER TEXT="& a_text ) call replacebadstrings(a_text) response.write("

" & vbcrlf) response.write("ANSWER TYPE="& a_type &"

" & vbcrlf) response.write("ANSWER UNITS="& a_units &"

" & vbcrlf) %>

<% ' ' CLose database connection ' Set RS=nothing Connection.Close Set Connection=nothing %>