Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old November 28th, 2006, 12:17 PM
Registered User
 
Join Date: Nov 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default second drop down not showing

I have an ASP page that I am trying to show two drop downs that pull a list from my database. The first drop down is working but the second doesn't show up on the page...any insight is 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>


  #2 (permalink)  
Old March 23rd, 2007, 11:15 PM
Friend of Wrox
 
Join Date: Jul 2003
Location: South San Francisco, CA, USA.
Posts: 128
Thanks: 0
Thanked 1 Time in 1 Post
Default

mhodges,
I experienced the same situation. I my solution at that time was
just use option box instead of Select dropdown/combobox.
I know the display does not look appealing but it worked.
I hope this helps.
John



Similar Threads
Thread Thread Starter Forum Replies Last Post
subforms are not showing up bjcountry Access 2 March 22nd, 2008 08:39 AM
images not showing in IE Adam H-W CSS Cascading Style Sheets 3 March 20th, 2008 07:02 AM
Subform Not Showing tready Access 4 November 13th, 2005 10:30 AM
drop down list values based on another drop down noor ASP.NET 1.0 and 1.1 Basics 3 July 5th, 2005 09:57 AM
Populating Drop Down based on other drop down jeffbarclay Java Databases 1 November 7th, 2003 12:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.