Need Heirachical Listing of Database, navigable

Results 1 to 2 of 2

Thread: Need Heirachical Listing of Database, navigable

  1. #1
    Sol Betancourt Guest

    Default Need Heirachical Listing of Database, navigable

    Heres my problem. I have a huge database of Specimens that need to be searchable and navigable via heirachical methods. For example, they are sorted by their taxa (kingdom, phylum, class, order, family, genus, species) there are too many to have it be hand coded HTML. I need to start out with a page with all the (7) Kingdoms on it, then after clicking on one, i need to display the underlying phylums as links to their underlying classes, etc etc etc. The way i see it its a form of "multiple filtering" which is a snap to do in Access, i cant figure out how to do it here. please help me out, email me if you need more info soljb@rocketmail.com thanks again

  2. #2
    Jason Buck Guest

    Default RE: Need Heirachical Listing of Database, navigable

    Without having a list of the field names it is kind of hard to help you.<BR><BR>This is something that I have that might be close to what you are looking for.<BR><BR><BR>Page 1 search form code <BR><BR>&#060;form method="Post" action="summary2.asp"&#062;<BR>&#060;table&#062;&# 060;tr&#062;<BR><BR><BR>&#060;%<BR><BR><BR>strConn ect = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:database e1.mdb"<BR><BR>dim objconn, objrec, mysql, strStatus, Mytest, strLength<BR>set objconn = server.createobject("ADODB.Connection")<BR><BR><BR >objConn.open strConnect<BR><BR><BR>mysql = "SELECT CLIENT.CLIMAT, CLIENT.RESP_ATTY, CLIENT.CLINAME, CLIMAS.OMNGST, CLIMAS.FORGST, CLIMAS.PLGST, CLIMAS.NONUS, CLIMAS.QDT, CLIMAS.EC, CLIMAS.CHB, CLIMAS.SCORP, CLIMAS.FLP, CLIMAS.LQP, CLIMAS.FCG, CLIMAS.HUSDURABLE, CLIMAS.WIFDURABLE, CLIMAS.HUSPATIENT, CLIMAS.WIFPATIENT FROM CLIENT INNER JOIN CLIMAS ON CLIENT.CLIMAT = CLIMAS.CLIMAT ORDER BY CLIENT.RESP_ATTY;"<BR><BR><BR><BR><BR><BR>set rstemp=objConn.execute(mysql)<BR><BR>&#039howmanyf ields=rstemp.fields.count -1<BR><BR>If not rstemp.eof then<BR> <BR><BR><BR><BR> Do While Not rstemp.EOF<BR> <BR> <BR> <BR><BR><BR><BR> rstemp.movenext<BR> Loop<BR> <BR><BR><BR><BR>End if<BR>rstemp.close<BR><BR>%&#062;<BR><BR><BR><BR>& #039***The code below dynamically lists all the Attorneys in the Attorney Table.<BR><BR>&#060;td&#062;&#060;b&#062;Select a Attorney&#060;/b&#062;<BR><BR><BR><BR>&#060;%<BR>mysql = "SELECT ATTYTE.ATTYID, ATTYTE.ATTYNAME FROM ATTYTE ORDER BY ATTYTE.ATTYNAME ;"<BR><BR>set rstemp=objConn.execute(mysql)<BR><BR><BR>response. write "&#060;select name=&#039ATTYNAME&#039&#062;"<BR><BR>If not rstemp.eof then<BR><BR>&#039****strAttyNameValue is to get the value to post ie a value to represent your TAXAID<BR>&#039****strAttyNamestr is to get the value to display in the list box ie your TAXA NAME (Kindom, phylum.....)<BR><BR> Do While Not rstemp.EOF<BR>strAttyNameValue = rstemp("ATTYID")<BR>strAttyNamestr = rstemp("ATTYNAME")<BR><BR>&#039***** If strForgst is to bind to a data field. Include it even though it is not necessary<BR> If strforgst = strAttyNameValue Then<BR> response.write "&#060;Option Selected value=" & strAttyNameValue & "&#062;" & strAttyNamestr & "&#060;/option&#062;"<BR> Else<BR> response.write "&#060;Option value=" & strAttyNameValue & "&#062;" & strAttyNamestr & "&#060;/option&#062;"<BR> End if<BR> rstemp.movenext<BR> Loop<BR><BR> <BR>response.write "&#060;/select&#062;"<BR>End if<BR><BR> rstemp.close<BR> <BR><BR><BR>%&#062;<BR><BR>&#039******End the dynamic listing of all names in the TABLE<BR>&#060;/td&#062;<BR><BR>&#060;td&#062;&#060;b&#062;Select a Area to Query&#060;b&#062;<BR><BR>&#060;select name="SummaryArea"&#062;<BR>&#060;option value="CLIMAS.CHB"&#062;Closely Held Business&#060;/option&#062;<BR>&#060;option value="CLIMAS.EC"&#062;Environmental Concerns&#060;/option&#062;<BR>&#060;option value="CLIMAS.FLP"&#062;Family Limited Partnership&#060;/option&#062;<BR>&#060;option value="CLIMAS.FCG"&#062;Fractional Charitable Gift&#060;/option&#062;<BR>&#060;option value="CLIMAS.FORGST"&#062;Formula GST&#060;/option&#062;<BR>&#060;option value="CLIMAS.HUSDURABLE"&#062;Husband - Durable Power of Attorney&#060;/option&#062;<BR>&#060;option value="CLIMAS.HUSPATIENT"&#062;Husband - Patient Advocate&#060;/option&#062;<BR>&#060;option value="CLIMAS.LQP"&#062;Large Qualified Plan&#060;/option&#062;<BR>&#060;option value="CLIMAS.NONUS"&#062;Non-U.S. Citizen&#060;/option&#062;<BR>&#060;option value="CLIMAS.OMNGST"&#062;Omibus GST&#060;/option&#062;<BR>&#060;option value="CLIMAS.WIFDURABLE"&#062;Wife - Durable Power of Attorney&#060;/option&#062;<BR>&#060;option value="CLIMAS.WIFPATIENT"&#062;Wife - Patient Advocate&#060;/option&#062;<BR>&#060;option value="CLIMAS.PLGST"&#062;Planned GST&#060;/option&#062;<BR>&#060;option value="CLIMAS.QDT"&#062;Qualified Domestic Trust&#060;/option&#062;<BR>&#060;option value="CLIMAS.SCORP"&#062;Subchapter S Corportation&#060;/option&#062;<BR>&#060;/select&#062;<BR>&#060;/td&#062;<BR><BR><BR>&#060;td&#062;&#060;b&#062;Sel ect a Status&#060;/b&#062;<BR><BR><BR>&#060;%<BR>mysql = "SELECT sumyvalu.text, sumyvalu.order, sumyvalu.intval FROM sumyvalu WHERE (((sumyvalu.intval)&#062;&#039""&#039));"<BR><BR>s et rstemp=objConn.execute(mysql)<BR><BR><BR>response. write "&#060;select name=&#039YesNoUnk&#039&#062;"<BR><BR>If not rstemp.eof then<BR><BR><BR> Do While Not rstemp.EOF<BR>strforgstValue = rstemp("intval")<BR>strforgststr = rstemp("text")<BR> If strforgst = strforgstValue Then<BR> response.write "&#060;Option Selected value=" & strforgstValue & "&#062;" & strforgststr & "&#060;/option&#062;"<BR> Else<BR> response.write "&#060;Option value=" & strforgstValue & "&#062;" & strforgststr & "&#060;/option&#062;"<BR> End if<BR> rstemp.movenext<BR> Loop<BR><BR> <BR>response.write "&#060;/select&#062;"<BR>End if<BR><BR> rstemp.close<BR> <BR><BR><BR>%&#062;<BR>&#060;/td&#062;&#060;/tr&#062;<BR>&#060;/table&#062;<BR>&#060;input type="submit" value="Submit" name="B1"&#062;&#060;input type="reset" value="Reset" name="B2"&#062;&#060;/form&#062;<BR>&#060;center&#062;&#060;b&#062;You must make a selection in all 3 areas&#060;/b&#062;&#060;/center&#062;<BR>&#060;/body&#062;<BR>&#060;/html&#062;<BR><BR><BR>Page 2 Display Search code<BR><BR><BR>&#060;%<BR>strATTYNAME = request.form("ATTYNAME")<BR>strSummaryArea = request.form("SummaryArea")<BR>strYesNoUnk = request.form("YesNoUnk")<BR>If strYesNoUnk = "Y" Then<BR> strStatus = "Yes"<BR>End If<BR>If strYesNoUnk = "N" Then<BR> strStatus = "NO"<BR>End If<BR><BR>If strYesNoUnk = "D" Then<BR> strStatus = "UNKNOWN"<BR>End If<BR><BR><BR>If strSummaryArea ="CLIMAS.CHB" Then<BR> response.write "&#060;center&#062;&#060;h2&#062;Closely Held Business Report = " & strstatus & "&#060;/h2&#062;&#060;/center&#062;"<BR>End if<BR><BR><BR>If strSummaryArea ="CLIMAS.EC"Then <BR> response.write "&#060;center&#062;&#060;h2&#062;Environmental Concerns Report = " & strstatus & "&#060;/h2&#062;&#060;/center&#062;"<BR>End if <BR><BR>If strSummaryArea ="CLIMAS.FLP" Then<BR> response.write "&#060;center&#062;&#060;h2&#062;Family Limited Partnership Report = " & strstatus & "&#060;/h2&#062;&#060;/center&#062;"<BR>End if <BR><BR>If strSummaryArea ="CLIMAS.FCG" Then<BR> response.write "&#060;center&#062;&#060;h2&#062;Fractional Charitable Gift Report = " & strstatus & "&#060;/h2&#062;&#060;/center&#062;"<BR>End if <BR><BR>If strSummaryArea ="CLIMAS.FORGST" Then<BR> response.write "&#060;center&#062;&#060;h2&#062;Formula GST Report = " & strstatus & "&#060;/h2&#062;&#060;/center&#062;"<BR>End if <BR><BR>If strSummaryArea ="CLIMAS.HUSDURABLE" Then<BR> response.write "&#060;center&#062;&#060;h2&#062;Husband - Durable Power of Attorney Report = " & strstatus & "&#060;/h2&#062;&#060;/center&#062;"<BR>End if <BR><BR>If strSummaryArea ="CLIMAS.HUSPATIENT" Then<BR> response.write "&#060;center&#062;&#060;h2&#062;Husband - Patient Advocate Report = " & strstatus & "&#060;/h2&#062;&#060;/center&#062;"<BR>End if <BR><BR>If strSummaryArea ="CLIMAS.LQP" Then<BR> response.write "&#060;center&#062;&#060;h2&#062;Large Qualified Plan Report = " & strstatus & "&#060;/h2&#062;&#060;/center&#062;"<BR>End if <BR><BR>If strSummaryArea ="CLIMAS.NONUS" Then<BR> response.write "&#060;center&#062;&#060;h2&#062;Non-U.S. Citizen Report = " & strstatus & "&#060;/h2&#062;&#060;/center&#062;"<BR>End if <BR><BR>If strSummaryArea ="CLIMAS.OMNGST" Then<BR> response.write "&#060;center&#062;&#060;h2&#062;Omibus GST Report = " & strstatus & "&#060;/h2&#062;&#060;/center&#062;"<BR>End if <BR><BR>If strSummaryArea ="CLIMAS.WIFDURABLE" Then<BR> response.write "&#060;center&#062;&#060;h2&#062;Wife - Durable Power of Attorney Report = " & strstatus & "&#060;/h2&#062;&#060;/center&#062;"<BR>End if <BR><BR>If strSummaryArea ="CLIMAS.WIFPATIENT" Then<BR> response.write "&#060;center&#062;&#060;h2&#062;Wife - Patient Advocate Report = " & strstatus & "&#060;/h2&#062;&#060;/center&#062;"<BR>End if <BR><BR>If strSummaryArea ="CLIMAS.PLGST" Then<BR> response.write "&#060;center&#062;&#060;h2&#062;Planned GST Report = " & strstatus & "&#060;/h2&#062;&#060;/center&#062;"<BR>End if <BR><BR>If strSummaryArea ="CLIMAS.QDT" Then <BR> response.write "&#060;center&#062;&#060;h2&#062;Qualified Domestic Trust Report = " & strstatus & "&#060;/h2&#062;&#060;/center&#062;"<BR>End if <BR><BR>If strSummaryArea ="CLIMAS.SCORP" Then <BR> response.write "&#060;center&#062;&#060;h2&#062;Subchapter S Corportation Report = " & strstatus & "&#060;/h2&#062;&#060;/center&#062;"<BR>End if <BR><BR><BR><BR>strConnect = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:database e1.mdb"<BR><BR>dim objconn, objrec, mysql, strStatus, Mytest, strLength<BR>set objconn = server.createobject("ADODB.Connection")<BR><BR><BR >objConn.open strConnect<BR><BR>mysql = "SELECT CLIENT.CLIMAT, CLIENT.RESP_ATTY, CLIENT.CLINAME, &#039" & strSummaryArea & "&#039 FROM CLIENT INNER JOIN CLIMAS ON CLIENT.CLIMAT = CLIMAS.CLIMAT WHERE (((CLIENT.RESP_ATTY)=&#039" & strAttyName & "&#039) AND ((" & strSummaryArea & ")=&#039" & strYesNoUnk & "&#039 )) ORDER BY CLIENT.RESP_ATTY ;"<BR><BR><BR>&#039mysql = "SELECT CLIENT.CLIMAT, CLIENT.RESP_ATTY, CLIENT.CLINAME, &#039" & strSummaryArea & "&#039 FROM CLIENT INNER JOIN CLIMAS ON CLIENT.CLIMAT = CLIMAS.CLIMAT WHERE (((CLIENT.RESP_ATTY)=&#039" & strAttyName & "&#039) AND ((&#039" & strSummaryArea & "&#039)=&#039" & strYesNoUnk & "&#039)) ORDER BY CLIENT.RESP_ATTY;"<BR><BR><BR><BR><BR>set rstemp=objConn.execute(mysql)<BR><BR><BR>&#039howm anyfields=rstemp.fields.count -1<BR>response.write "&#060;table border=&#039 1&#039&#062;&#060;tr&#062;&#060;th&#062;CLIMAT&#06 0;/th&#062;&#060;th&#062;RESP_ATTY&#060;/th&#062;&#060;th&#062;CLIENT&#060;/th&#062;&#060;/tr&#062;"<BR><BR>If not rstemp.eof then<BR><BR><BR> Do While Not rstemp.EOF<BR> strClimat = rstemp("Climat")<BR> strRESPATTY = rstemp("Resp_Atty")<BR> strCLINAME = rstemp("Cliname")<BR> response.write "&#060;tr&#062;&#060;td&#062;&#060;a href=&#039summary.asp?climat=" & strClimat & "&#039&#062;" & strClimat & "&#060;/td&#062;&#060;td&#062;" & strRespatty & "&#060;/td&#062;&#060;td&#062;" & strCliname & "&#060;/td&#062;&#060;/tr&#062;"<BR><BR> rstemp.movenext<BR> Loop<BR><BR> <BR>response.write "&#060;/table&#062;"<BR><BR>End if<BR><BR>set rstemp= nothing<BR>objconn.close<BR>set objconn = nothing<BR>%&#062;<BR><BR>I can&#039t explain this clearly with out seeing your field list from the table. So this is an example.<BR><BR>Jason<BR>webmaster@wnj.com<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •