<%@ Language=VBScript %>

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<TABLE cellSpacing=1 cellPadding=1 width="100%" border=0>
  
  <TR>
    <TD bgColor=lightblue>
      <P align=center><STRONG>Feature Detail 
Dispaly</STRONG></P></TD></TR></TABLE>
<TABLE cellSpacing=1 cellPadding=1 width="100%" border=1>
<%	
	Dim SQL1, FeatureID,sFeatureName, sFeatureType, sCounty, sState, sElev, sEstPop
	Dim sLat, sLon, Conn, RS

	Set Conn = Server.CreateObject("ADODB.Connection")
	Conn.Open "DRIVER={SQL Server};SERVER=WEBSRV01;UID=web;pwd=w3bs1t3;DATABASE=AVANTE"

	' Getting information passed on from other page
	FeatureID = Request("FeatureID")

	SQL1 = "exec Find_Feature_Details '" + FeatureID +"'"	
	Set RS = Conn.Execute(SQL1)
	
if rs.eof then
	Response.Write "<br>"
	Response.Write "<br>"
	Response.Write "<p></p>"
	Response.Write "<Center><h1> No Data Available </h1></center>"

End if

Set sFeatureName=rs("FeatureName")
Set sFeatureType=rs("FeatureType")
Set sCounty=rs("County")
Set sState=rs("State")
Set sLat=rs("Lat_Dec")
Set sLon=rs("Lon_Dec")
Set sElev=rs("Elev")
Set sEstPop=rs("EstPop")

Do while not rs.eof

	Response.Write "<Table><TR><TD>Feature Name:</TD><TD colSpan=3>" & sFeatureName & "</TD></TR>"
	Response.Write "<TR><TD>State:</TD><TD>" & sState & "</TD><TD>County:</TD><TD>" & sCounty & "</TD></TR>"
	Response.Write "<TR><TD>Lattitude:</TD><TD>" & sLat & "</TD><TD>Longitude:</TD><TD>" & sLon & "</TD></TR>"
	Response.Write "<TR><TD>Feature Type:</TD><TD>" & sFeatureType & "</TD><TD>Elevation:</TD><TD>" & sElev & "</TD></TR>"
	Response.Write "<TR><TD></TD><TD></TD><TD>Estimated Population (If Applicable):</TD><TD>" & sEstPop & "</TD></TR>"
	Response.Write "<TR><TD>Feature Id:</TD><TD><C>" & FeatureID & "</C></TD><TD></TD></TR></TABLE>"
	
	rs.movenext
Loop	
%>

</BODY>
</HTML>
