|
I am very new to asp so any help will be greatly appreciated.
I have a very simple access database with one table with 5 fields which are Alarm, description, Action, priority, category.
I have managed to make a pull down menu which is populated from the Alarm column. I have then inserted a database results region using Frontpage (not sure how wise that is!!) which outputs the the 5 fields in a scrolling text area based on the selection that is made from the pull down menu.
The problem is I cannot get the pull menu to give the database results region to take the value and return the results. I know it may be a mistake to try to use the frontpage database function but I am very new to working with asp and databases.
The following is the code on my page. I appologise for the length of my post.
-----------------------------------------------------------
<form method= "POST" action="new_test_alarms.asp" name="alarmListing">
<select size="1" name="ReefAlarms" bgcolor="#008000" tabindex="1">
<option selected>Select...</option>
<%
strDataSource="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\nkcweb\fpdb\reef_fault_management.mdb; Persist Security Info=False"
set conn = server.createobject ("adodb.connection")
conn.open strDataSource
set RSAlarmDescription = conn.Execute("SELECT Alarm from AlarmDescription ORDER by Alarm")
' Populate form pull-down list
Do Until RSalarmdescription.EOF %>
<option value="<% response.write RSalarmdescription("Alarm") %>"><% response.write RSalarmdescription("alarm") %></option>
<%
RSalarmDescription.MoveNext
Loop
' End of Populate
' =================================================================
%>
<input type= "submit" value="Go" name="B2" tabindex="5"></td>
</form>
<p> </p>
<!--webbot bot="DatabaseRegionStart" startspan
s-columnnames="ID,Alarm,Description,Action,Severity,Category"
s-columntypes="3,203,203,203,3,203" s-dataconnection="Database1"
b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice s-menuvalue
b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE"
b-listlabels="TRUE" b-listseparator="TRUE" i-ListFormat="8" b-makeform="TRUE"
s-recordsource="AlarmDescription"
s-displaycolumns="Alarm,Description,Action,Severity,Category"
s-criteria="[Alarm] EQ {Alarm} +" s-order
s-sql="SELECT * FROM AlarmDescription WHERE (Alarm = '::Alarm::')"
b-procedure="FALSE" clientside SuggestedExt="asp" s-DefaultFields="Alarm="
s-NoRecordsFound="No records returned." i-MaxRecords="1" i-GroupSize="0"
BOTID="0" u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc"
u-dbrgn2="_fpclass/fpdbrgn2.inc" tag="BODY"
local_preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00" align="left"><font color="#000000">Database Results regions will not preview unless this page is fetched from a Web server using a web browser. The section of the page from here to the end of the Database Results region will repeat once for each record returned by the query.</font></td></tr></table>"
preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00" align="left"><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"-->
<%
fp_sQry="SELECT * FROM AlarmDescription WHERE (Alarm = '::Alarm::')"
fp_sDefault="Alarm="
fp_sNoRecords="No records returned."
fp_sDataConn="Database1"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=5
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" i-CheckSum="2326" endspan -->
<form METHOD= "POST" >
<!--webbot bot="PurpleText"
PREVIEW="Set this form's properties so it submits user input to the appropriate page."
-->
<table BORDER="0">
<tr>
<td><b>Alarm:</b></td>
<td><textarea NAME="Alarm" ROWS="2" COLS="40"><%=FP_FieldHTML(fp_rs,"Alarm")%></textarea></td>
</tr>
<tr>
<td><b>Description:
|