Hi,
I just checked the permissions and I had already set up the entire directory, including the fpdb folder, to have every possible permission, including the ones you list.
Here is what I am trying to accomplish:
I have a database of chemicals for a lab (over 1000) on Access 2003. While I am familiar with HTML, I chose to buy FrontPage 2003 to put it online because I have never worked with ASP pages before.
I set up a folder on my server and set up all the permissions, and then I got rid of the many Database Results Wizard errors I encountered. Ultimately, I would like for my database to be online at the site I previously posted. I also want it to:
I. Have very basic password protection (at least), which I have now and appears to work well.
II. Be searchable by chemical name.
III. Have the ability to be modified.
IV. Have the ability to have chemicals added.
V. Be viewable (works now in the results section).
I don't really much care whether or not chemicals can be deleted from the database, although I would prefer that *not* to be included in my page.
So far, I have had very little luck with accomplishing my goals, which I think are nothing out of the ordinary. I used the Database Interface Wizard to build what I have now and none of it really works and I don't know why. Even my detail.asp doesn't show up in the main page. The code below is the code for every page at the link. On the site, the *only* thing that works the way I want is te results page (and I didn't even want a results page without a search). Even the main page, which displays all the chemicals, does not display them in order, and I already set up a sort, to no effect.
As you look at the code, please do no hesitate to give me any other adivce, any additional templates, or anything else that might be of use to me. I wish to set up a database that follows the above criteria, but I do not really care which path I take to get there. It doesn't have to be fancy, it just has to work...
Below, all oage names are in caps and the code is under.
DATABASE_EDITOR.ASP
<!--#include File='login.asa'-->
<%
If Session(SiteID) <> true Then
Response.Redirect("Login.asp?requester=database_editor.asp")
End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Inventory -- Home</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<frameset rows="40%,*" framespacing="1" frameborder="1" border="1">
<frame name="list" src="list.asp">
<frame name="detail" src="detail.asp">
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>
LIST.ASP
<!--#include File='login.asa'-->
<%
If Session(SiteID) <> true Then
Response.Redirect("Login.asp?requester=list.asp")
End If
%>
<html>
<head>
<% ' FP_ASP -- ASP Automatically generated by a FrontPage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Inventory -- List</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body bgcolor="#FFFFFF">
<script Language="JavaScript"><!--
var sAction = "form";
var NoRecordsChecked = true;
function OnClickBtn( el )
{
if( el.name != "form_list" )
{
if( el.value == "Add New Record" )
{
document.form_list.target = "detail";
document.form_list.action = "new.asp";
sAction = "btn"
}
else if( el.value == "Delete Selected Records" )
{
for (i=0;i<document.form_list.elements.length;i++)
{
if (document.form_list.elements.checked)
{
NoRecordsChecked = false;
}
}
if (NoRecordsChecked)
{
sAction = "form";
alert("Select the records you wish to delete and then choose Delete Selected Records.");
return;
}
document.form_list.target = "detail";
document.form_list.action = "delete.asp";
sAction = "btn"
}
}
else
{
if( sAction != "btn" )
{
document.form_list.target = "_self";
document.form_list.action = "list.asp";
}
sAction = "form";
}
}
-->
</script>
<table width="100%" align=left>
<tr>
<td width="50%">
<b><font size=+3 color="#000080"> Database Editor - <i>Inventory</i></font></b>
</td>
<td width="50%" align=right>
<table>
<tr>
<td>
<a href="../results_page.asp" target="_top">Results Page</a> |
<a href="submission_form.asp" target="_top">Submission Form</a> |
Database Editor
</td>
</tr>
</table>
</td>
</tr>
</table>
<br clear=all>
<form name="form_list" target="_self" action="list.asp" method="POST" OnClick="OnClickBtn(this)">
<table>
<td>
<p><input name="btnAction" type="submit" value="Add New Record" OnClick="OnClickBtn(this)"></p>
</td>
<td>
<p><input name="btnAction" type="submit" value="Delete Selected Records" OnClick="OnClickBtn(this)"></p>
</td>
</table>
<hr>
<table border="0">
<thead>
<tr>
<td></td>
<td bgcolor="black"><font color="white" size="2"><b>Chemical Name</b></font></td>
<td bgcolor="black"><font color="white" size="2"><b>Quantity</b></font></td>
<td bgcolor="black"><font color="white" size="2"><b>Amount</b></font></td>
<td bgcolor="black"><font color="white" size="2"><b>In stock</b></font></td>
<td bgcolor="black"><font color="white" size="2"><b>Safety Classification</b></font></td>
<td bgcolor="black"><font color="white" size="2"><b>Storage</b></font></td>
<td bgcolor="black"><font color="white" size="2"><b>Location</b></font></td>
<td bgcolor="black"><font color="white" size="2"><b>Ordered by</b></font></td>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by," s-columntypes="202,202,202,202,202,202,202,202," s-dataconnection="realinventory" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="FALSE" b-tableexpand="FALSE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-ListFormat="0" b-makeform="TRUE" s-RecordSource="Inventory" s-displaycolumns="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-criteria s-order s-sql="SELECT * FROM Inventory ORDER BY "Chemical Name" ASC" b-procedure="FALSE" clientside SuggestedExt="asp" s-DefaultFields s-NoRecordsFound="No records returned." i-MaxRecords="256" i-GroupSize="5" u-dblib="../../../_fpclass/fpdblib.inc" u-dbrgn1="../../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../../_fpclass/fpdbrgn2.inc" Tag="TBODY" startspan BOTID="0" preview="<tr><td colspan=64 bgcolor="#FFFF00" width="100%"><font color="#000000">This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.</font></td></tr>" --><!--#include file="../../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM Inventory ORDER BY ""Chemical Name"" ASC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=8 align=""LEFT"" width=""100%"">No records returned.</td></tr>"
fp_sDataConn="realinventory"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=5
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&Chemical Name=202&Quantity=202&Amount=202&In stock=202&Safety Classification=202&Storage=202&Location=202&Ordered by=202&"
fp_iDisplayCols=8
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="52436" -->
<tr>
<td><input type="checkbox" name="<%=FP_FieldURL(fp_rs,"Chemical Name")%>" value="ON"></td>
<td><a href="detail.asp?Field1=<%=FP_FieldURL(fp_rs,"Chemical Name")%>" target="detail">
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Chemical Name" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Chemical Name<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Chemical Name")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="26111" --></a></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Quantity" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Quantity<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Quantity")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="18235" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Amount" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Amount<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Amount")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="15126" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="In stock" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>In stock<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"In stock")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="16100" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Safety Classification" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Safety Classification<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Safety Classification")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="58921" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Storage" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Storage<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Storage")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="14978" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Location" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Location<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Location")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="16691" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Ordered by" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Ordered by<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Ordered by")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="29499" --></td>
</tr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="../../../_fpclass/fpdbrgn2.inc" i-groupsize="5" clientside Tag="TBODY" startspan preview="<tr><td colspan=64 bgcolor="#FFFF00" width="100%"><font color="#000000">This is the end of a Database Results region.</font></td></tr><TR><TD VALIGN=MIDDLE COLSPAN=64><NOBR><INPUT TYPE=Button VALUE=" |< "><INPUT TYPE=Button VALUE=" < "><INPUT TYPE=Button VALUE=" > "><INPUT TYPE=Button VALUE=" >| "> [1/5]</NOBR><BR></td></tr>" --><!--#include file="../../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="9297" -->
</tbody>
</table>
</form>
</body>
</html>
DETAIL.ASP
<!--#include File='login.asa'-->
<%
If Session(SiteID) <> true Then
Response.Redirect("Login.asp?requester=detail.asp")
End If
%>
<html>
<head>
<% ' FP_ASP -- ASP Automatically generated by a FrontPage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Inventory -- Home</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body bgcolor="#FFFFFF">
<!--webbot bot="PurpleText" PREVIEW="-Important- If you modify this Database Results region using the Database Results Wizard, then your Database Editor will no longer work. If you accidentally open the Database Results Wizard, simply click Cancel to exit without regenerating the Database Results region." -->
<!--webbot bot="DatabaseRegionStart" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-columntypes="202,202,202,202,202,202,202,202" s-dataconnection="realinventory" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="FALSE" i-ListFormat="5" b-makeform="FALSE" s-RecordSource="Inventory" s-displaycolumns="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-criteria="{Chemical Name} EQ {Chemical Name} +" s-order s-sql="SELECT * FROM Inventory WHERE "Chemical Name" = '::Field1::'" b-procedure="FALSE" clientside SuggestedExt="asp" s-DefaultFields="Field1=" s-NoRecordsFound="No records returned." i-MaxRecords="1" i-GroupSize="0" u-dblib="../../../_fpclass/fpdblib.inc" u-dbrgn1="../../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../../_fpclass/fpdbrgn2.inc" Tag="BODY" startspan BOTID="0" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.</font></td></tr></table>" --><!--#include file="../../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM Inventory WHERE ""Chemical Name"" = '::Field1::'"
fp_sDefault="Field1="
fp_sNoRecords="No records returned."
fp_sDataConn="realinventory"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&Chemical Name=202&Quantity=202&Amount=202&In stock=202&Safety Classification=202&Storage=202&Location=202&Ordered by=202&"
fp_iDisplayCols=8
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="10513" -->
<table BORDER=0>
<tr>
<td><b><font size="2">Chemical Name:</font></b></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Chemical Name" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Chemical Name<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Chemical Name")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="26111" --></td>
</tr><tr>
<td><b><font size="2">Quantity:</font></b></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Quantity" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Quantity<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Quantity")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="18235" --></td>
</tr><tr>
<td><b><font size="2">Amount:</font></b></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Amount" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Amount<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Amount")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="15126" --></td>
</tr><tr>
<td><b><font size="2">In stock:</font></b></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="In stock" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>In stock<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"In stock")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="16100" --></td>
</tr><tr>
<td><b><font size="2">Safety Classification:</font></b></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Safety Classification" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Safety Classification<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Safety Classification")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="58921" --></td>
</tr><tr>
<td><b><font size="2">Storage:</font></b></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Storage" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Storage<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Storage")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="14978" --></td>
</tr><tr>
<td><b><font size="2">Location:</font></b></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Location" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Location<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Location")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="16691" --></td>
</tr><tr>
<td><b><font size="2">Ordered by:</font></b></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Ordered by" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Ordered by<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Ordered by")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="29499" --></td>
</tr>
<tr><td><table>
<tr>
<td>
<form method="POST" action="edit.asp">
<input type="hidden" name="Field1" value="'<%=FP_FieldHTML(fp_rs,"Chemical Name")%>'">
<p><input type="submit" value=" Edit " name="B1"></p>
</form>
</td>
<td>
<form method="POST" action="delete.asp">
<input type="hidden" name="Field1" value="'<%=FP_FieldHTML(fp_rs,"Chemical Name")%>'">
<p><input type="submit" value="Delete" name="B1"></p>
</form>
</td>
</tr>
</table></td></tr>
</table>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../../../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside Tag="BODY" startspan preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the end of a Database Results region.</font></td></tr></table>" --><!--#include file="../../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="9297" -->
</body>
</html>
EDIT.ASP
<!--#include File='login.asa'-->
<%
If Session(SiteID) <> true Then
Response.Redirect("Login.asp?requester=edit.asp")
End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Inventory -- Edit</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body bgcolor="#FFFFFF">
<!--webbot bot="PurpleText" PREVIEW="-Important- If you modify this Database Results region using the Database Results Wizard, then your Database Editor will no longer work. If you accidentally open the Database Results Wizard, simply click Cancel to exit without regenerating the Database Results region." -->
<!--webbot bot="DatabaseRegionStart" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-columntypes="202,202,202,202,202,202,202,202" s-dataconnection="realinventory" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="FALSE" i-ListFormat="5" b-makeform="FALSE" s-RecordSource="Inventory" s-displaycolumns="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-criteria="{Chemical Name} EQ {Chemical Name} +" s-order s-sql="SELECT * FROM Inventory WHERE "Chemical Name" = ::Field1::" b-procedure="FALSE" clientside SuggestedExt="asp" s-DefaultFields="Field1=" s-NoRecordsFound="No records returned." i-MaxRecords="1" i-GroupSize="0" u-dblib="../../../_fpclass/fpdblib.inc" u-dbrgn1="../../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../../_fpclass/fpdbrgn2.inc" Tag="BODY" startspan BOTID="0" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.</font></td></tr></table>" --><!--#include file="../../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM Inventory WHERE ""Chemical Name"" = ::Field1::"
fp_sDefault="Field1="
fp_sNoRecords="No records returned."
fp_sDataConn="realinventory"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&Chemical Name=202&Quantity=202&Amount=202&In stock=202&Safety Classification=202&Storage=202&Location=202&Ordered by=202&"
fp_iDisplayCols=8
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="28850" --> <form METHOD="POST" action="update.asp" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">
<table BORDER=0>
<tr>
<td><b><font size="2">Quantity:</font></b></td>
<td> <!--webbot bot="Validation" s-display-name="Quantity" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Quantity" size="64" value="<%=FP_FieldHTML(fp_rs,"Quantity")%>" maxlength="255"></td>
</tr>
<tr>
<td><b><font size="2">Amount:</font></b></td>
<td> <!--webbot bot="Validation" s-display-name="Amount" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Amount" size="64" value="<%=FP_FieldHTML(fp_rs,"Amount")%>" maxlength="255"></td>
</tr>
<tr>
<td><b><font size="2">In stock:</font></b></td>
<td> <!--webbot bot="Validation" s-display-name="Field4" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Field4" size="64" value="<%=FP_FieldHTML(fp_rs,"In stock")%>" maxlength="255"></td>
</tr>
<tr>
<td><b><font size="2">Safety Classification:</font></b></td>
<td> <!--webbot bot="Validation" s-display-name="Field5" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Field5" size="64" value="<%=FP_FieldHTML(fp_rs,"Safety Classification")%>" maxlength="255"></td>
</tr>
<tr>
<td><b><font size="2">Storage:</font></b></td>
<td> <!--webbot bot="Validation" s-display-name="Storage" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Storage" size="64" value="<%=FP_FieldHTML(fp_rs,"Storage")%>" maxlength="255"></td>
</tr>
<tr>
<td><b><font size="2">Location:</font></b></td>
<td> <!--webbot bot="Validation" s-display-name="Location" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Location" size="64" value="<%=FP_FieldHTML(fp_rs,"Location")%>" maxlength="255"></td>
</tr>
<tr>
<td><b><font size="2">Ordered by:</font></b></td>
<td> <!--webbot bot="Validation" s-display-name="Field8" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Field8" size="64" value="<%=FP_FieldHTML(fp_rs,"Ordered by")%>" maxlength="255"></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value=" OK "><input type="reset" value=" Reset "></td>
</tr>
</table>
<input type="hidden" name="Field1" value="'<%=FP_FieldHTML(fp_rs,"Chemical Name")%>'">
</form>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../../../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside Tag="BODY" startspan preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the end of a Database Results region.</font></td></tr></table>" --><!--#include file="../../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="9297" -->
</body>
</html>
DELETE.ASP
<!--#include File='login.asa'-->
<%
If Session(SiteID) <> true Then
Response.Redirect("Login.asp?requester=delete.asp")
End If
%>
<% Response.Buffer = True %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Inventory -- Delete</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body bgcolor="#FFFFFF">
<% If Request("btnAction") = "New" Then
Response.Redirect ""
End If
%>
<% If Request.QueryString("FP_Num_Items") = "" Then
fp_sMyQry = ""
If Request.Form("Field1") <> "" Then
nCount = 1
fp_sMyQry = "&Row0=" & Server.UrlEncode(Request.Form("Field1"))
else
nCount = 0
For Each Field In Request.Form
If Request.Form(Field) = "ON" Then
fp_sMyQry = fp_sMyQry & "&Row" & nCount & "='" & Field & "'"
nCount = nCount + 1
End If
Next 'Field
End If
If Len(fp_sMyQry) > 0 Then
sRedirect = "delete.asp?FP_Num_Items=" & nCount & fp_sMyQry
Response.Redirect sRedirect
End If
End If
%>
<% if Len(Request("ConfirmDelete")) = 0 then %>
<!--webbot bot="PurpleText" PREVIEW="-Important- If you modify this Database Results region using the Database Results Wizard, then your Database Editor will no longer work. If you accidentally open the Database Results Wizard, simply click Cancel to exit without regenerating the Database Results region." -->
<table border="0">
<thead>
<tr>
<td bgcolor="black"><font color="white" size="2"><b>Chemical Name</b></font></td>
<td bgcolor="black"><font color="white" size="2"><b>Quantity</b></font></td>
<td bgcolor="black"><font color="white" size="2"><b>Amount</b></font></td>
<td bgcolor="black"><font color="white" size="2"><b>In stock</b></font></td>
<td bgcolor="black"><font color="white" size="2"><b>Safety Classification</b></font></td>
<td bgcolor="black"><font color="white" size="2"><b>Storage</b></font></td>
<td bgcolor="black"><font color="white" size="2"><b>Location</b></font></td>
<td bgcolor="black"><font color="white" size="2"><b>Ordered by</b></font></td>
</tr>
<thead>
<tbody>
<!--#include file="../../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM Inventory WHERE ""Chemical Name"" = ::Row0:: "
fp_iItems = CInt(Request("FP_Num_Items"))
fp_iTemp = 1
do while(fp_iTemp < fp_iItems)
fp_sQry = fp_sQry & " OR ""Chemical Name"" = ::Row" & fp_iTemp & "::"
fp_iTemp = fp_iTemp + 1
loop
fp_sNoRecords="<tr><td colspan=4 align=""LEFT"" width=""100%"">No records returned.</td></tr>"
fp_sDataConn="realinventory"
fp_iMaxRecords=256
fp_iCommandType=1
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sColTypes="&Chemical Name=202&Quantity=202&Amount=202&In stock=202&Safety Classification=202&Storage=202&Location=202&Ordered by=202"
fp_iDisplayCols=4
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../../_fpclass/fpdbrgn1.inc"-->
<tr>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Chemical Name" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Chemical Name<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Chemical Name")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="26111" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Quantity" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Quantity<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Quantity")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="18235" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Amount" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Amount<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Amount")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="15126" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="In stock" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>In stock<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"In stock")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="16100" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Safety Classification" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Safety Classification<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Safety Classification")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="58921" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Storage" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Storage<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Storage")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="14978" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Location" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Location<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Location")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="16691" --></td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Ordered by" b-tableformat="TRUE" b-hasHTML="FALSE" clientside startspan b-makelink b-MenuFormat preview="<font size="-1"><<</font>Ordered by<font size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Ordered by")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="29499" --></td>
</tr>
<!--#include file="../../../_fpclass/fpdbrgn2.inc"-->
</tbody>
</table>
<center>
<form method="POST">
<%select case fp_iCount %>
<%case 0:%>
<p><b><font size="4">Click OK to refresh.</font></b></p>
<p><input type="submit" value="OK" name="ConfirmDelete"></p>
<%case 1:%>
<p><b><font size="4">Are you sure you want to delete this record?</font></b></p>
<p><input type="submit" value=" OK " name="ConfirmDelete"> <input type="submit" value="Cancel" name="ConfirmDelete"></p>
<%case else:%>
<p><b><font size="4">Are you sure you want to delete these records?</font></b>
<p><input type="submit" value=" OK " name="ConfirmDelete"> <input type="submit" value="Cancel" name="ConfirmDelete"></p>
<%end select%></form>
</center>
<%
Response.end
ElseIf Request("ConfirmDelete") = "Cancel" Then
Response.Clear
Response.Redirect "detail.asp"
End If
%>
<script Language="JavaScript">
<!--
top.list.location.href = top.list.location.href;
// -->
</script>
<!--#include file="../../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="DELETE FROM Inventory WHERE ""Chemical Name"" = ::Row0:: "
fp_iItems = CInt(Request("FP_Num_Items"))
fp_iTemp = 1
do while(fp_iTemp < fp_iItems)
fp_sQry = fp_sQry & " OR ""Chemical Name"" = ::Row" & fp_iTemp & "::"
fp_iTemp = fp_iTemp + 1
loop
fp_sDefault=""
fp_sNoRecords="Record deleted from table."
fp_sDataConn="realinventory"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&Chemical Name=202&Quantity=202&Amount=202&In stock=202&Safety Classification=202&Storage=202&Location=202&Ordered by=202"
fp_fCustomQuery=True
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="../../../_fpclass/fpdbrgn1.inc"-->
<p><!--webbot bot="PurpleText" PREVIEW="This is the DELETE query." --></p>
<!--#include file="../../../_fpclass/fpdbrgn2.inc"-->
</body>
</html>
NEW.ASP
<%
' FP_ASP ASP Automatically generated by a FrontPage Component. Do not Edit.
On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Err.Clear
strErrorUrl = ""
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "0" Then
Err.Clear
Set fp_conn = Server.CreateObject("ADODB.Connection")
FP_DumpError strErrorUrl, "Cannot create connection"
Set fp_rs = Server.CreateObject("ADODB.Recordset")
FP_DumpError strErrorUrl, "Cannot create record set"
fp_conn.Open Application("realinventory_ConnectionString")
FP_DumpError strErrorUrl, "Cannot open database"
fp_rs.Open "Inventory", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
FP_DumpError strErrorUrl, "Cannot open record set"
fp_rs.AddNew
FP_DumpError strErrorUrl, "Cannot add new record set to the database"
Dim arFormFields0(8)
Dim arFormDBFields0(8)
Dim arFormValues0(8)
arFormFields0(0) = "Field1"
arFormDBFields0(0) = "Chemical Name"
arFormValues0(0) = Request("Field1")
arFormFields0(1) = "Quantity"
arFormDBFields0(1) = "Quantity"
arFormValues0(1) = Request("Quantity")
arFormFields0(2) = "Amount"
arFormDBFields0(2) = "Amount"
arFormValues0(2) = Request("Amount")
arFormFields0(3) = "Field4"
arFormDBFields0(3) = "In stock"
arFormValues0(3) = Request("Field4")
arFormFields0(4) = "Field5"
arFormDBFields0(4) = "Safety Classification"
arFormValues0(4) = Request("Field5")
arFormFields0(5) = "Storage"
arFormDBFields0(5) = "Storage"
arFormValues0(5) = Request("Storage")
arFormFields0(6) = "Location"
arFormDBFields0(6) = "Location"
arFormValues0(6) = Request("Location")
arFormFields0(7) = "Field8"
arFormDBFields0(7) = "Ordered by"
arFormValues0(7) = Request("Field8")
FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0
fp_rs.Update
FP_DumpError strErrorUrl, "Cannot update the database"
fp_rs.Close
fp_conn.Close
Session("FP_SavedFields")=arFormFields0
Session("FP_SavedValues")=arFormValues0
Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")
Response.Redirect "confirm.asp"
End If
End If
Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")
%>
<!--#include File='login.asa'-->
<%
If Session(SiteID) <> true Then
Response.Redirect("Login.asp?requester=submission_form.asp")
End If
%>
<% Response.Buffer = True %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Inventory -- New</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body bgcolor="#FFFFFF">
<table width="100%" align=left>
<tr>
<td width="50%">
<b><font size=+3 color="#000080"> Submission Form </font></b>
</td>
<td width="50%" align=right>
<table>
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>
<br clear="all">
<hr>
<p>
<form METHOD="POST" action="--WEBBOT-SELF--" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">
<!--webbot bot="SaveDatabase" SuggestedExt="asp" S-DataConnection="realinventory" S-RecordSource="Inventory" U-Confirmation-Url="confirm.asp" S-Form-Fields="Field1 Quantity Amount Field4 Field5 Storage Location Field8" S-Form-DBFields="Chemical\ Name Quantity Amount In\ stock Safety\ Classification Storage Location Ordered\ by " B-UseDBFieldsForConfirmation="True" U-ASP-Include-Url="../../../_fpclass/fpdbform.inc" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="../../../_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" i-checksum="52631" endspan -->
<p><b>Chemical Name</b><br>
<!--webbot bot="Validation" s-display-name="Field1" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Field1" size="64" value="" maxlength="255"><br>
</p>
<p><b>Quantity</b><br>
<!--webbot bot="Validation" s-display-name="Quantity" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Quantity" size="64" value="" maxlength="255"><br>
</p>
<p><b>Amount</b><br>
<!--webbot bot="Validation" s-display-name="Amount" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Amount" size="64" value="" maxlength="255"><br>
</p>
<p><b>In stock</b><br>
<!--webbot bot="Validation" s-display-name="Field4" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Field4" size="64" value="" maxlength="255"><br>
</p>
<p><b>Safety Classification</b><br>
<!--webbot bot="Validation" s-display-name="Field5" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Field5" size="64" value="" maxlength="255"><br>
</p>
<p><b>Storage</b><br>
<!--webbot bot="Validation" s-display-name="Storage" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Storage" size="64" value="" maxlength="255"><br>
</p>
<p><b>Location</b><br>
<!--webbot bot="Validation" s-display-name="Location" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Location" size="64" value="" maxlength="255"><br>
</p>
<p><b>Ordered by</b><br>
<!--webbot bot="Validation" s-display-name="Field8" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Field8" size="64" value="" maxlength="255"><br>
</p>
<p><input type="submit" value=" OK "><input type="reset" value=" Reset "></p>
</form>
</body>
</html>
UPDATE.ASP
<!--#include File='login.asa'-->
<%
If Session(SiteID) <> true Then
Response.Redirect("Login.asp?requester=update.asp")
End If
%>
<html>
<head>
<% ' FP_ASP -- ASP Automatically generated by a FrontPage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Inventory -- Updated Record</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body bgcolor="#FFFFFF">
<!--webbot bot="PurpleText" PREVIEW="-Important- If you modify this Database Results region using the Database Results Wizard, then your Database Editor will no longer work. If you accidentally open the Database Results Wizard, simply click Cancel to exit without regenerating the Database Results region." -->
<script Language="JavaScript">
<!--
top.list.location.href = top.list.location.href;
// -->
</script>
<!--webbot bot="DatabaseRegionStart" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-columntypes="202,202,202,202,202,202,202,202" s-dataconnection="realinventory" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="FALSE" b-listseparator="FALSE" i-ListFormat="0" b-makeform="FALSE" s-RecordSource s-displaycolumns s-criteria s-order s-sql="UPDATE Inventory SET Quantity = '::Quantity::' , Amount = '::Amount::' , "In stock" = '::Field4::' , "Safety Classification" = '::Field5::' , Storage = '::Storage::' , Location = '::Location::' , "Ordered by" = '::Field8::' WHERE ("Chemical Name" = ::Field1::)" b-procedure="FALSE" clientside SuggestedExt="asp" s-DefaultFields="Quantity=&Amount=&Field4=&Field5=&Storage=&Location=&Field8=&Field1=" s-NoRecordsFound="Record updated in table." i-MaxRecords="1" i-GroupSize="0" u-dblib="../../../_fpclass/fpdblib.inc" u-dbrgn1="../../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../../_fpclass/fpdbrgn2.inc" Tag="BODY" startspan BOTID="0" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.</font></td></tr></table>" --><!--#include file="../../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="UPDATE Inventory SET Quantity = '::Quantity::' , Amount = '::Amount::' , ""In stock"" = '::Field4::' , ""Safety Classification"" = '::Field5::' , Storage = '::Storage::' , Location = '::Location::' , ""Ordered by"" = '::Field8::' WHERE (""Chemical Name"" = ::Field1::)"
fp_sDefault="Quantity=&Amount=&Field4=&Field5=&Storage=&Location=&Field8=&Field1="
fp_sNoRecords="Record updated in table."
fp_sDataConn="realinventory"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&Chemical Name=202&Quantity=202&Amount=202&In stock=202&Safety Classification=202&Storage=202&Location=202&Ordered by=202&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="59892" -->
<p><!--webbot bot="PurpleText" PREVIEW="This is the UPDATE query." --></p>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../../../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside Tag="BODY" startspan preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the end of a Database Results region.</font></td></tr></table>" --><!--#include file="../../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="9297" -->
</body>
</html>
CONFIRM.ASP
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Inventory -- Confirm</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<script Language="JavaScript">
<!--
top.list.location.href = top.list.location.href;
// -->
</script>
<body bgcolor="#FFFFFF">
<p>New record added.</p>
</body>
</html>
SUBMISSION_FORM.ASP
<%
' FP_ASP ASP Automatically generated by a FrontPage Component. Do not Edit.
On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Err.Clear
strErrorUrl = ""
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "0" Then
Err.Clear
Set fp_conn = Server.CreateObject("ADODB.Connection")
FP_DumpError strErrorUrl, "Cannot create connection"
Set fp_rs = Server.CreateObject("ADODB.Recordset")
FP_DumpError strErrorUrl, "Cannot create record set"
fp_conn.Open Application("realinventory_ConnectionString")
FP_DumpError strErrorUrl, "Cannot open database"
fp_rs.Open "Inventory", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
FP_DumpError strErrorUrl, "Cannot open record set"
fp_rs.AddNew
FP_DumpError strErrorUrl, "Cannot add new record set to the database"
Dim arFormFields0(8)
Dim arFormDBFields0(8)
Dim arFormValues0(8)
arFormFields0(0) = "Field1"
arFormDBFields0(0) = "Chemical Name"
arFormValues0(0) = Request("Field1")
arFormFields0(1) = "Quantity"
arFormDBFields0(1) = "Quantity"
arFormValues0(1) = Request("Quantity")
arFormFields0(2) = "Amount"
arFormDBFields0(2) = "Amount"
arFormValues0(2) = Request("Amount")
arFormFields0(3) = "Field4"
arFormDBFields0(3) = "In stock"
arFormValues0(3) = Request("Field4")
arFormFields0(4) = "Field5"
arFormDBFields0(4) = "Safety Classification"
arFormValues0(4) = Request("Field5")
arFormFields0(5) = "Storage"
arFormDBFields0(5) = "Storage"
arFormValues0(5) = Request("Storage")
arFormFields0(6) = "Location"
arFormDBFields0(6) = "Location"
arFormValues0(6) = Request("Location")
arFormFields0(7) = "Field8"
arFormDBFields0(7) = "Ordered by"
arFormValues0(7) = Request("Field8")
FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0
fp_rs.Update
FP_DumpError strErrorUrl, "Cannot update the database"
fp_rs.Close
fp_conn.Close
FP_FormConfirmationFromArrays "text/html; charset=windows-1252",_
"Form Confirmation",_
"Thank you for submitting the following information:",_
"submission_form.asp",_
"Return to the form.",_
arFormDBFields0,_
arFormValues0
End If
End If
Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")
%>
<!--#include File='login.asa'-->
<%
If Session(SiteID) <> true Then
Response.Redirect("Login.asp?requester=submission_form.asp")
End If
%>
<% Response.Buffer = True %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Inventory -- New</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body bgcolor="#FFFFFF">
<table width="100%" align=left>
<tr>
<td width="50%">
<b><font size=+3 color="#000080"> Submission Form </font></b>
</td>
<td width="50%" align=right>
<table>
<tr>
<td>
<a href="../results_page.asp" target="_top">Results Page</a> |
Submission Form
| <a href="database_editor.asp" target="_top">Database Editor</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>
<br clear="all">
<hr>
<p>
<form METHOD="POST" action="--WEBBOT-SELF--" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">
<!--webbot bot="SaveDatabase" SuggestedExt="asp" S-DataConnection="realinventory" S-RecordSource="Inventory" S-Form-Fields="Field1 Quantity Amount Field4 Field5 Storage Location Field8" S-Form-DBFields="Chemical\ Name Quantity Amount In\ stock Safety\ Classification Storage Location Ordered\ by " B-UseDBFieldsForConfirmation="True" U-ASP-Include-Url="../../../_fpclass/fpdbform.inc" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="../../../_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" i-checksum="52631" endspan -->
<p><b>Chemical Name</b><br>
<!--webbot bot="Validation" s-display-name="Field1" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Field1" size="64" value="" maxlength="255"><br>
</p>
<p><b>Quantity</b><br>
<!--webbot bot="Validation" s-display-name="Quantity" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Quantity" size="64" value="" maxlength="255"><br>
</p>
<p><b>Amount</b><br>
<!--webbot bot="Validation" s-display-name="Amount" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Amount" size="64" value="" maxlength="255"><br>
</p>
<p><b>In stock</b><br>
<!--webbot bot="Validation" s-display-name="Field4" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Field4" size="64" value="" maxlength="255"><br>
</p>
<p><b>Safety Classification</b><br>
<!--webbot bot="Validation" s-display-name="Field5" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Field5" size="64" value="" maxlength="255"><br>
</p>
<p><b>Storage</b><br>
<!--webbot bot="Validation" s-display-name="Storage" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Storage" size="64" value="" maxlength="255"><br>
</p>
<p><b>Location</b><br>
<!--webbot bot="Validation" s-display-name="Location" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Location" size="64" value="" maxlength="255"><br>
</p>
<p><b>Ordered by</b><br>
<!--webbot bot="Validation" s-display-name="Field8" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Field8" size="64" value="" maxlength="255"><br>
</p>
<p><input type="submit" value=" OK "><input type="reset" value=" Reset "></p>
</form>
</body>
</html>
RESULTS_PAGE.ASP
<html>
<head>
<% ' FP_ASP -- ASP Automatically generated by a FrontPage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Inventory -- View</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body bgcolor="#FFFFFF">
<table width="100%" align=left>
<tr>
<td width="50%">
<b><font size=+3 color="#000080"> Results Page </font></b>
</td>
<td width="50%" align=right>
<table>
<tr>
<td>
Results Page
| <a href="editor/submission_form.asp" target="_top">Submission Form</a>
| <a href="editor/database_editor.asp" target="_top">Database Editor</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>
<br clear="all">
<hr>
<p>
<table width="100%" border="1">
<thead>
<tr>
<th align="left"><b>Chemical Name</b></th>
<th align="left"><b>Quantity</b></th>
<th align="left"><b>Amount</b></th>
<th align="left"><b>In stock</b></th>
<th align="left"><b>Safety Classification</b></th>
<th align="left"><b>Storage</b></th>
<th align="left"><b>Location</b></th>
<th align="left"><b>Ordered by</b></th>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-columntypes="202,202,202,202,202,202,202,202" s-dataconnection="realinventory" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="TRUE" s-recordsource="Inventory" s-displaycolumns="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-criteria s-order s-sql="SELECT * FROM Inventory" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="5" botid="0" u-dblib="../../_fpclass/fpdblib.inc" u-dbrgn1="../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" tag="TBODY" startspan preview="<tr><td colspan=64 bgcolor="#FFFF00" width="100%"><font color="#000000">This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.</font></td></tr>" --><!--#include file="../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM Inventory"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=8 align=""LEFT"" width=""100%"">No records returned.</td></tr>"
fp_sDataConn="realinventory"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=5
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&Chemical Name=202&Quantity=202&Amount=202&In stock=202&Safety Classification=202&Storage=202&Location=202&Ordered by=202&"
fp_iDisplayCols=8
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="29518" -->
<tr>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Chemical Name" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>Chemical Name<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"Chemical Name")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="26111" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Quantity" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>Quantity<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"Quantity")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="18235" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Amount" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>Amount<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"Amount")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="15126" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="In stock" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>In stock<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"In stock")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="16100" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Safety Classification" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>Safety Classification<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"Safety Classification")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="58921" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Storage" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>Storage<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"Storage")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="14978" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Location" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>Location<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"Location")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="16691" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="Chemical Name,Quantity,Amount,In stock,Safety Classification,Storage,Location,Ordered by" s-column="Ordered by" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>Ordered by<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"Ordered by")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="29499" -->
</td>
</tr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="5" clientside tag="TBODY" startspan preview="<tr><td colspan=64 bgcolor="#FFFF00" width="100%"><font color="#000000">This is the end of a Database Results region.</font></td></tr><TR><TD VALIGN=MIDDLE COLSPAN=64><NOBR><INPUT TYPE=Button VALUE=" |< "><INPUT TYPE=Button VALUE=" < "><INPUT TYPE=Button VALUE=" > "><INPUT TYPE=Button VALUE=" >| "> [1/5]</NOBR><BR></td></tr>" --><!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="65064" -->
</tbody>
</table>
</body>
</html>
LOGIN.ASP
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Inventory -- Login</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body bgcolor="#FFFFFF">
<table width="100%" align=left>
<tr>
<td width="50%">
<b><font size=+3 color="#000080"> Database Editor Login </font></b>
</td>
<td width="50%" align=right>
<table>
<tr>
<td>
<a href="../results_page.asp" target="_top">Results Page</a> |
<a href="submission_form.asp" target="_top">Submission Form</a> |
Database Editor
</td>
</tr>
</table>
</td>
</tr>
</table>
<br clear=all>
<hr>
<FORM ACTION="Login_Validate.asp" METHOD="post">
<p>
<h3>Database Editor Login</h3>
<br>
<p>
<TABLE BORDER=0>
<TR>
<TD ALIGN="right">User name:</TD>
<TD><INPUT TYPE="text" NAME="login" size="10" VALUE=''></INPUT></TD>
</TR>
<TR>
<TD ALIGN="right">Password:</TD>
<TD><INPUT TYPE="password" NAME="password" size="10" VALUE=''></INPUT></TD>
</TR>
<TR>
<TD>
<input TYPE="hidden" NAME="requester" VALUE="<%=Server.HtmlEncode(Request("requester"))%>">
</TD>
<TD>
</TD>
</TR>
<TR>
<TD align="left">
<INPUT TYPE="submit" VALUE="Login"></INPUT>
</TD>
<TD>
</TD>
</TR>
</TABLE>
</FORM>
<p><!--webbot bot="PurpleText" PREVIEW="You may change your Database Editor username and password by editing the file: realinventory_interface/Inventory/editor/login.asa" --></p>
</body>
</html>
LOGIN.ASA
<%
' Username and password for the realinventory.Inventory Database Editor
' are set here:
SiteId="{C5B61EAD-8AF3-464E-B667-7CA05C2397D9}"
Username="battlab"
Password="battlab"
%>
LOGIN_VALIDATE.ASP
<!--#include file="login.asa"-->
<%
' if any of the variables do not match, create error message
if Request.Form("login") <> Username or Request.Form("password") <> Password then
MsgErr = "<h3>Authorization Failed.</h3>" & "<br>" & "<a href=login.asp>Please try again.</a>"
Response.Write MsgErr
' if correct, set the session variable and proceed
Else
Session(SiteId) = true
' redirect
If Len(Request("requester")) > 0 Then
Response.Redirect (Request("requester"))
Else
Response.Redirect "database_editor.asp"
End if
End if
%>
<body bgcolor="#FFFFFF">
The inventory itself is on the site at the link... If you would like any other files don't hesitate to ask...Thank you all so much for the help :)!!