<%@ 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>Business&nbsp;Detail 
Dispaly</STRONG></P></TD></TR></TABLE>
<TABLE cellSpacing=1 cellPadding=1 width="100%" border=1>
<%	
	Dim SQL1, FeatureID,sName, 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
	BusID = Request("BusID")

	SQL1 = "exec Find_Business_Details '" + BusID +"'"	
	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 sName=rs("Name")
Set sAddr1=rs("Address_1")
Set sAddr2=rs("Address_2")
Set sCity=rs("City")
Set sCounty=rs("County")
Set sState=rs("State")
Set sZip=rs("Zip")
Set sPhone=rs("PhoneNum")
Set sWeb=rs("Web")
Set sSIC1=rs("SIC1")
Set sSIC2=rs("SIC2")
Set sSIC3=rs("SIC3")
Set sSIC4=rs("SIC4")

Do while not rs.eof

	Response.Write "<Table><TR><TD>Business Name:</TD><TD colSpan=3>" & sName & "</TD></TR>"
	Response.Write "<TR><TD>Address:</TD><TD>" & sAddr1 & "</TD><TD></TD>"
	Response.Write "<TR><TD></TD><TD>" & sAddr2 & "</TD><TD></TD>"
	Response.Write "<TR><TD>State:</TD><TD>" & sState & "</TD><TD>County:</TD><TD>" & sCounty & "</TD></TR>"
	Response.Write "<TR><TD>Zip:</TD><TD>" & sZIP & "</TD><TD></TD><TD></TD></TR>"
	Response.Write "<TR><TD>Phone:</TD><TD>" & sPhone & "</TD><TD>Web Site:</TD><TD>" & sWeb & "</TD></TR>"
	Response.Write "<TR><TD>Business Type:</TD><TD>" & sSIC1& "</TD><TD></TD><TD></TD></TR>"
	Response.Write "<TR><TD></TD><TD>" & sSIC2 & "</C></TD><TD></TD></TR>"
	Response.Write "<TR><TD></TD><TD>" & sSIC3 & "</C></TD><TD></TD></TR>"
	Response.Write "<TR><TD></TD><TD>" & sSIC4 & "</C></TD><TD></TD></TR>"
	Response.Write "</TABLE>"
	
	rs.movenext
Loop	
%></TABLE>

</BODY>
</HTML>
