%@Language=VBScript%>
<%
Dim oRS
Dim strSQLNew
Dim oTemplate
'now get recordset from clsmydb
set mBotanic=new clsmydb
'*******************************************************************************
'now start query
'make a selection from parameter form
maxRes=500
cSize=5
if (Request.QueryString("BotanicName")="") and (Request.QueryString("GenusName")="") then
loadContent= "Error retreiving data or you dont enter some keyword"
loadContent=loadContent & "
Press Back to Return"
else
if (Request.QueryString("BotanicName")<>"" OR Request.QueryString("GenusName")<>"") then
if not (Request.QueryString("BotanicName")="") then 'if method post change it
strSQLNew="SELECT SpID, taxa, SpeciesName"
strSQLNew=strSQLNew & " FROM qryBotanicNames"
strSQLNew=strSQLNew & " WHERE taxa LIKE '%" & Ucase(Request.QueryString("BotanicName")) & "%'" 'if method post change it
strSQLNew=strSQLNew & " ORDER BY taxa;"
set oRS=mBotanic.GetList(strSQLNew,maxRes,cSize)
elseif not (Request.QueryString("GenusName")="")then 'if method post change it
strSQLNew="SELECT SpID, taxa, SpeciesName"
strSQLNew=strSQLNew & " FROM qryBotanicNames"
strSQLNew=strSQLNew & " WHERE Genus Like '" & Request.QueryString("GenusName") & "'"
strSQLNew=strSQLNew & " ORDER BY taxa"
set oRS=mBotanic.GetList(strSQLNew,maxRes,cSize)
end if
'after make query now fill the content
currentPage=Request.QueryString("whichpage") 'if method post change it
If currentPage="" Then
currentPage=1
End If
pageSize=Request.QueryString("pagesize") 'if method post change it
If pageSize="" Then
pageSize=10
End If
loadContent="
"
oRS.MoveFirst
oRS.PageSize=pageSize
PageCount = CInt(oRS.PageCount)
If PageCount > CInt(maxRes / PageSize) Then
maxCount = CInt(maxRes / PageSize)
Else
maxCount = PageCount
End If
oRS.AbsolutePage=currentPage
loadContent=loadContent & " Your search found " & TotalRec & " botanic names. The current name is listed for each botanic name. Click on the current name for information on species. " loadContent=loadContent & "Page " & currentPage & " of " & maxCount & " " loadContent=loadContent & "
| |
" loadContent=loadContent & " | " loadContent=loadContent & "