drop down issues
I have an ASP page that I want to drop down lists populated from seperate SQL tables. The first is working fine...the second drop down doesn't even appear on the page...I am new to ASP so I am not really sure what to check...any suggestions are greatly appreciated.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<%
Dim conn,strstate,strjuris,SQL1,SQL2
set conn = Server.CreateObject("ADODB.Connection")
set strstate = Server.CreateObject("ADODB.Recordset")
set strjuris = Server.CreateObject("ADODB.Recordset")
conn.Open ("Provider=SQLOLEDB;User ID=sa;password=master;Initial Catalog=Inventory;Data Source=10.1.5.59")
SQL1 = ("select state from states")
SQL2 = ("SELECT JURISDICTION FROM JURISDICTIONS")
strstate.Open SQL1,conn
%>
<P> Select a State: </P>
<p>
<select name="state" size="1">
<%While Not strstate.EOF%>
<option value="<%=strstate("state")%>"><%=strstate("state" )%></option>
<%
strstate.MoveNext
wend
strstate.Close
strstate = Nothing
conn.Close
conn = Nothing
%>
</select>
</p>
<p>
<%
strjuris.Open sql2,conn
%>
<P>Select a Jurisdiction: </P>
<select name="jurisdiction" size="1">
<%While Not strjuris.EOF%>
<option value="<%=strjuris("jurisdiction")%>"><%=strjuris( "jurisdiction")%></option>
<%
strjuris.MoveNext
wend
strjuris.Close
strjuris = Nothing
conn.Close
conn = Nothing
%>
</select>
</p>
</body>
</html>
|