<!--#include file="template_sup.asp" --> <% 'First check if the database has the Selectable attribute in the references to only select those references. '-------------------------------------------------------------------------------------------------------------------------- SQL="SELECT sysobjects.name AS Exp1 FROM sysobjects INNER JOIN syscolumns ON sysobjects.id = syscolumns.id WHERE (sysobjects.name LIKE 'Reference') AND (syscolumns.name LIKE N'Selectable')" Set RVisibleCol = Server.CreateObject("ADODB.Recordset") RVisibleCol.ActiveConnection = MM_jun_STRING RVisibleCol.Source = SQL RVisibleCol.CursorType = 3 RVisibleCol.CursorLocation = 2 RVisibleCol.LockType = 1 RVisibleCol.Open() if RVisibleCol.RecordCount > 0 then SelectableColExist= True else SelectableColExist= False end if RVisibleCol.close set RVisibleCol=Nothing 'I create a different SQL depending if the Visible column exist or not in the database if SelectableColExist= True then SQL="SELECT RefCache, RefId FROM Reference WHERE (RefCache IS NOT NULL) AND (Selectable = 1)" Else SQL="SELECT RefCache, RefId FROM Reference WHERE (RefCache IS NOT NULL)" End if '-------------------------------------------------------------------------------------------------------------------------- 'Select all the available sources to present into the Reference box Set Rsources = Server.CreateObject("ADODB.Recordset") Rsources.ActiveConnection = MM_jun_STRING Rsources.Source = SQL Rsources.CursorType = 3 Rsources.CursorLocation = 2 Rsources.LockType = 1 Rsources.Open() %> <TABLE cellSpacing=0 cellPadding=5 width="100%" border=0> <TBODY> <TR> <TD vAlign=center width=5><IMG height=19 alt="" src="images/woodsDayLink.gif" width=17 border=0> </TD> <TD noWrap><B>Search!</B></TD> <TD width="100%"> <HR SIZE=1> </TD> </TR> </TBODY> </TABLE> <TABLE cellSpacing=0 cellPadding=5 width="100%" border=0> <TBODY> <TR> <TD width=1> </TD> <TD width="100%"> <TABLE cellPadding=1 width="100%"> <TBODY> <TR> <TD vAlign=top> <p> Fill in the empty field in order to query the database for a specific name. Use the asterisk (*) as a wild card (e.g. Calend* will find all names starting with Calend, Calendula officinalis * will find the names of subspecies etc. of Calendula officinalis, *aaa* will find all names containing triple a, and Ca*la will find Calendula etc.). The input must contain at least three characters. The search is only on the name itself, so please do not include authorship or year of publication. </p> <p>Search for a botanical name like "Calendula*":</p> <form name="form1" method="post" action="results.asp"> <table width="68%" border="1" align="center" cellpadding="4" cellspacing="3" bordercolor="#666666" bgcolor="#F5F5F5" style="border-collapse: collapse"> <tr> <td width="23%"><strong>Name:</strong></td> <td width="77%"> <div align="left"> <input name="name" type="text" id="name" style="BORDER-RIGHT: #ffffff 1px groove; BORDER-TOP: #ffffff 1px groove; FONT: 10px Verdana,Geneva,sans-serif; BORDER-LEFT: #ffffff 1px groove; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px groove; HEIGHT: 17px; BACKGROUND-COLOR: #DBE3CD" size="90"> </div></td> </tr> <tr> <td colspan="2"><input type="submit" name="Submit" value="Query" style="FONT: 12px Verdana,Geneva,sans-serif;"></td> </tr> </table> <p align="center"> </p> </form> <p>N.B.: Do not include taxonomic authors. <br> </p> <p> </p> <FONT class=small color=gray size=-1> </FONT></TD> <TD vAlign=top noWrap align=right></TD> </TR> </TBODY> </TABLE></TD> </TR> </TBODY> </TABLE> <% Rsources.close set Rsources=Nothing %> <!--#include file="template_inf.asp" -->