|
| |
|
|
archangelwes
Posts: 39 Joined: 3/9/2006 Status: offline
|
++ ASP search Results Page - 3/9/2006 16:06:24
Forgive me for being a newbie on ASP.. I'm a C++ developer.. I have a problem with my search results page... the view in frontpage looks fine but when the asp site is ran it puts all the code on display. If someone could help me it would be greatly appreciated..... The Full Code is as follows
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Company" content="Kalptaru Infotech Ltd. [www.a2zhelp.com]">
<title>ML</title>
<style>
<!--
td { font-family: Tahoma; font-size: 8pt; background-color: #E6F2FF;
border-style: solid; border-width: 1 }
th { font-family: Tahoma; font-size: 8pt; font-weight: bold; background-color:
#E6E6E6; border: 1 outset #FF9900 }
input { font-family: Tahoma; font-size: 8pt; border: 1 inset #E6E6E6 }
table { }
-->
</style>
</head>
<body>
<table border="0" cellpadding="2" width="100%">
<tr>
<td colspan="3" width="100%">Search Results</td>
</tr>
<tr>
<td width="10%"></td>
<td width="80%">
<%const DATABASE_NAME="MarriageLicenesdatabase.mdb"
dim Con
set Con=server.createobject("ADODB.Connection")
Con.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& server.mappath(DATABASE_NAME) & ";User Id=Admin;Password="
%>
<%
Dim sort_id 'The variable to sort data
Dim intPage 'The variable to hold current page number
Dim sSQL 'The variable to hold the SQL Statement
Dim intPageCount 'The var to hold total page count
Dim intRecordCount 'The var to hold total records count
Dim intFinish 'The var to hold the last page count
Dim intStart 'The var to hold the first page count
Dim intRecord
Dim sort_type
Dim new_sort_type
'-------Getting Info of page Number-------------
sort_id=Request("sortid")
If Request.QueryString("NAV") = "" Then
intPage = 1
Else
intPage = Request.QueryString("NAV")
End If
sort_type = Request("sorttype")
dim sSortSymbol
dim sTempSymbol
dim current_sort
if ucase(sort_type)="DESC" then
sort_type="DESC"
new_sort_type="ASC"
sTempSymbol="[<FONT FACE=wingdings>ê</font>]"
else
sort_type="ASC"
new_sort_type="DESC"
sTempSymbol="[<FONT FACE=wingdings>é</font>]"
end if
dim sWhereCondition %>
<%'-------Getting IdNumber
dim IdNumber
IdNumber=Request("IdNumber")%>
<%if trim(IdNumber) <>"" then
sWhereCondition=sWhereCondition & " AND [IdNumber] like '%" & IdNumber & "%'"
end if%>
<%'-------Getting GroomLast
dim GroomLast
GroomLast=Request("GroomLast")%>
<%if trim(GroomLast) <>"" then
sWhereCondition=sWhereCondition & " AND [GroomLast] like '%" & GroomLast & "%'"
end if%>
<%'-------Getting GroomFirst
dim GroomFirst
GroomFirst=Request("GroomFirst")%>
<%if trim(GroomFirst) <>"" then
sWhereCondition=sWhereCondition & " AND [GroomFirst] like '%" & GroomFirst & "%'"
end if%>
<%'-------Getting GroomAge
dim GroomAge
GroomAge=Request("GroomAge")%>
<%if trim(GroomAge) <>"" then
sWhereCondition=sWhereCondition & " AND [GroomAge] like '%" & GroomAge & "%'"
end if%>
<%'-------Getting GroomStreetAddress
dim GroomStreetAddress
GroomStreetAddress=Request("GroomStreetAddress")%>
<%if trim(GroomStreetAddress) <>"" then
sWhereCondition=sWhereCondition & " AND [GroomStreetAddress] like '%" & GroomStreetAddress & "%'"
end if%>
<%'-------Getting GroomCity
dim GroomCity
GroomCity=Request("GroomCity")%>
<%if trim(GroomCity) <>"" then
sWhereCondition=sWhereCondition & " AND [GroomCity] like '%" & GroomCity & "%'"
end if%>
<%'-------Getting BrideLast
dim BrideLast
BrideLast=Request("BrideLast")%>
<%if trim(BrideLast) <>"" then
sWhereCondition=sWhereCondition & " AND [BrideLast] like '%" & BrideLast & "%'"
end if%>
<%'-------Getting BrideFirst
dim BrideFirst
BrideFirst=Request("BrideFirst")%>
<%if trim(BrideFirst) <>"" then
sWhereCondition=sWhereCondition & " AND [BrideFirst] like '%" & BrideFirst & "%'"
end if%>
<%'-------Getting BrideAge
dim BrideAge
BrideAge=Request("BrideAge")%>
<%if trim(BrideAge) <>"" then
sWhereCondition=sWhereCondition & " AND [BrideAge] like '%" & BrideAge & "%'"
end if%>
<%'-------Getting BrideStreetAddress
dim BrideStreetAddress
BrideStreetAddress=Request("BrideStreetAddress")%>
<%if trim(BrideStreetAddress) <>"" then
sWhereCondition=sWhereCondition & " AND [BrideStreetAddress] like '%" & BrideStreetAddress & "%'"
end if%>
<%'-------Getting BrideCity
dim BrideCity
BrideCity=Request("BrideCity")%>
<%if trim(BrideCity) <>"" then
sWhereCondition=sWhereCondition & " AND [BrideCity] like '%" & BrideCity & "%'"
end if%>
<table border=0><tr>
<%if sWhereCondition="" then
sSQL="SELECT * FROM [tblMarriageLicenses]"
else
sWhereCondition = Right(sWhereCondition, Len(sWhereCondition) - 4)
sSQL="SELECT * FROM [tblMarriageLicenses]" & " WHERE " & sWhereCondition
end if
if sort_id<>"" then
sSQL=sSQL & " ORDER BY [" & sort_id & "] " & sort_type
end if
%>
</tr>
<%dim objRst 'The Recordset object
Set objRst = Server.CreateObject("ADODB.Recordset")
objRst.CursorLocation = 3 'adUseClient
objRst.CursorType = 3 'adOpenStatic
objRst.ActiveConnection = con
' Open the recordset.
objRst.Open sSql
'Now Prepend the sData String
objRst.PageSize = 10
' The cachesize property sets the number of records that will be cached
' locally in memory.
objRst.CacheSize = objRst.PageSize
intPageCount = objRst.PageCount
intRecordCount = objRst.RecordCount
If CInt(intPage) > CInt(intPageCount) Then intPage = intPageCount
If CInt(intPage) <= 0 Then intPage = 1
' Make sure that the recordset is not empty. If it is not, then set the
' AbsolutePage property and populate the intStart and the intFinish variables.
If intRecordCount > 0 Then
objRst.AbsolutePage = intPage
intStart = objRst.AbsolutePosition
If CInt(intPage) = CInt(intPageCount) Then
intFinish = intRecordCount
Else
intFinish = intStart + (objRst.PageSize - 1)
End If
End If%>
<tr>
<td colspan=100 align=center>
<%=intRecordCount%> Data Available
<%If intRecordCount > 0 Then
' Display the record that you are starting on and the record
' that you are finishing on for this page by writing out the
' values in the intStart and the intFinish variables.
%>
<br>You are now viewing records
<%=intStart%> through <%=intFinish%>.
</td>
</tr>
<%
if not sort_id="IdNumber" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=IdNumber&sorttype=<%=current_sort%>&NAV=<%=intPage %>">IdNumber <%=sSortSymbol%></a></th>
<%
if not sort_id="GroomLast" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=GroomLast&sorttype=<%=current_sort%>&NAV=<%=intPage %>">GroomLast <%=sSortSymbol%></a></th>
<%
if not sort_id="GroomFirst" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=GroomFirst&sorttype=<%=current_sort%>&NAV=<%=intPage %>">GroomFirst <%=sSortSymbol%></a></th>
<%
if not sort_id="GroomAge" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=GroomAge&sorttype=<%=current_sort%>&NAV=<%=intPage %>">GroomAge <%=sSortSymbol%></a></th>
<%
if not sort_id="GroomStreetAddress" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=GroomStreetAddress&sorttype=<%=current_sort%>&NAV=<%=intPage %>">GroomStreetAddress <%=sSortSymbol%></a></th>
<%
if not sort_id="GroomCity" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=GroomCity&sorttype=<%=current_sort%>&NAV=<%=intPage %>">GroomCity <%=sSortSymbol%></a></th>
<%
if not sort_id="BrideLast" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=BrideLast&sorttype=<%=current_sort%>&NAV=<%=intPage %>">BrideLast <%=sSortSymbol%></a></th>
<%
if not sort_id="BrideFirst" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=BrideFirst&sorttype=<%=current_sort%>&NAV=<%=intPage %>">BrideFirst <%=sSortSymbol%></a></th>
<%
if not sort_id="BrideAge" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=BrideAge&sorttype=<%=current_sort%>&NAV=<%=intPage %>">BrideAge <%=sSortSymbol%></a></th>
<%
if not sort_id="BrideStreetAddress" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=BrideStreetAddress&sorttype=<%=current_sort%>&NAV=<%=intPage %>">BrideStreetAddress <%=sSortSymbol%></a></th>
<%
if not sort_id="BrideCity" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=BrideCity&sorttype=<%=current_sort%>&NAV=<%=intPage %>">BrideCity <%=sSortSymbol%></a></th>
<th>Details</th>
<tr>
<%
dim i
dim iGroupId
%>
</tr>
<%
' Iterate through the recordset until we reach the end of the page
' or the last record in the recordset.
'need to write the following info for deleting the stuff
For intRecord = 1 to objRst.PageSize%>
<tr>
<td><%=objRst("IdNumber").Value%></td>
<td><%=objRst("GroomLast").Value%></td>
<td><%=objRst("GroomFirst").Value%></td>
<td><%=objRst("GroomAge").Value%></td>
<td><%=objRst("GroomStreetAddress").Value%></td>
<td><%=objRst("GroomCity").Value%></td>
<td><%=objRst("BrideLast").Value%></td>
<td><%=objRst("BrideFirst").Value%></td>
<td><%=objRst("BrideAge").Value%></td>
<td><%=objRst("BrideStreetAddress").Value%></td>
<td><%=objRst("BrideCity").Value%></td>
<TD><a href="ml_results_detail.asp?IdNumber=<%=objRst("IdNumber")%>&mVarTable=[tblMarriageLicenses]"> Detail </a></TD>
</tr>
<%objRst.MoveNext
If objRst.EOF Then Exit for
Next
%>
<%End IF%> <%
' Check to see if the current page is less than the last page
' in the recordset. If it is, then add a "Next" link.
%>
<tr align=center>
<td align=center colspan=30>
<%
if CInt(intPage)>1 then
%>
<a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sorttype=<%=sort_type%>&NAV=<%=intPage - 1%>&sortid=<%=sort_id%>">
<b><< Prev</b></a>
<%
end if
dim iCounter
for iCounter=1 to cint(intPageCount)
if not cInt(intPage)= iCounter then %>
<a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sorttype=<%=sort_type%>&NAV=<%=iCounter%>&sortid=<%=sort_id%>">
<b> <%=iCounter%> </b></a>
<% else%>
<b> <%=iCounter%> </b>
<% end if
next
If cInt(intPage) < cInt(intPageCount) Then %>
<a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sorttype=<%=sort_type%>&NAV=<%=intPage + 1%>&sortid=<%=sort_id%>">
<b>Next >></b></a>
<%End If%>
</td>
</tr>
</table></td>
<td width="10%"></td>
</tr>
<tr>
<td colspan="3" width="100%" bgcolor="#FF9900">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td bgcolor="#E6E6E6">
<p align="center"><font face="Tahoma" size="1" color="#0000FF"><br>
</font></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
< Message edited by Spooky -- 3/9/2006 19:05:59 >
|
|
|
|
archangelwes
Posts: 39 Joined: 3/9/2006 Status: offline
|
RE: ++ ASP search Results Page - 3/10/2006 0:44:37
Yes... It does support ASP.
|
|
|
|
archangelwes
Posts: 39 Joined: 3/9/2006 Status: offline
|
RE: ++ ASP search Results Page - 3/10/2006 12:46:43
Yes it works... I set up IIS and I saved the files in the wwwroot file... I do believe it is an error with the code itself... have you copied the code in an asp file and looked at it... Cause if it works on yours then I know for sure that my code isn't faulty.
|
|
|
|
archangelwes
Posts: 39 Joined: 3/9/2006 Status: offline
|
RE: ++ ASP search Results Page - 3/10/2006 12:51:59
Spooky.. do you have a type of messanger systems to were we can respond to eachother more quickly?
|
|
|
|
archangelwes
Posts: 39 Joined: 3/9/2006 Status: offline
|
RE: ++ ASP search Results Page - 3/10/2006 13:26:27
I printed the screen of the results I get when the page is done, and put the image here http://img486.imageshack.us/my.php?image=view5lw.jpg so you can see pretty much what it does.
|
|
|
|
dpf
Posts: 7121 Joined: 11/12/2003 From: India-napolis Status: offline
|
RE: ++ ASP search Results Page - 3/10/2006 13:27:59
there is a pm system here but generally., the point of the forum is to solve your problem AND create an open record so others can learn from it - therefore, posting here is preferred
_____________________________
Dan
|
|
|
|
archangelwes
Posts: 39 Joined: 3/9/2006 Status: offline
|
RE: ++ ASP search Results Page - 3/10/2006 13:51:24
no its not online... its over an intranet
|
|
|
|
archangelwes
Posts: 39 Joined: 3/9/2006 Status: offline
|
RE: ++ ASP search Results Page - 3/10/2006 14:06:37
the sorce code of the page is
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Company" content="Kalptaru Infotech Ltd. [www.a2zhelp.com]">
<title>ml</title>
<style>
<!--
td { font-family: Tahoma; font-size: 8pt; background-color: #E6F2FF;
border-style: solid; border-width: 1 }
th { font-family: Tahoma; font-size: 8pt; font-weight: bold; background-color:
#E6E6E6; border: 1 outset #FF9900 }
input { font-family: Tahoma; font-size: 8pt; border: 1 inset #E6E6E6 }
table { }
-->
</style>
</head>
<body>
<table border="0" cellpadding="2" width="100%">
<tr>
<td colspan="3" width="100%">Search Results</td>
</tr>
<tr>
<td width="10%"></td>
<td width="80%">
<%const DATABASE_NAME="../../../documents and settings/wesley beavers/desktop/designed groop 1/filler/BC&SOdatabase.mdb"
dim Con
set Con=server.createobject("ADODB.Connection")
Con.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& server.mappath(DATABASE_NAME) & ";User Id=Admin;Password="
%>
<%
Dim sort_id 'The variable to sort data
Dim intPage 'The variable to hold current page number
Dim sSQL 'The variable to hold the SQL Statement
Dim intPageCount 'The var to hold total page count
Dim intRecordCount 'The var to hold total records count
Dim intFinish 'The var to hold the last page count
Dim intStart 'The var to hold the first page count
Dim intRecord
Dim sort_type
Dim new_sort_type
'-------Getting Info of page Number-------------
sort_id=Request("sortid")
If Request.QueryString("NAV") = "" Then
intPage = 1
Else
intPage = Request.QueryString("NAV")
End If
sort_type = Request("sorttype")
dim sSortSymbol
dim sTempSymbol
dim current_sort
if ucase(sort_type)="DESC" then
sort_type="DESC"
new_sort_type="ASC"
sTempSymbol="[<FONT FACE=wingdings>ê</font>]"
else
sort_type="ASC"
new_sort_type="DESC"
sTempSymbol="[<FONT FACE=wingdings>é</font>]"
end if
dim sWhereCondition %>
<%'-------Getting IdNumber
dim IdNumber
IdNumber=Request("IdNumber")%>
<%if trim(IdNumber) <>"" then
sWhereCondition=sWhereCondition & " AND [IdNumber] like '%" & IdNumber & "%'"
end if%>
<%'-------Getting CourtDate
dim CourtDate
CourtDate=Request("CourtDate")%>
<%if trim(CourtDate) <>"" then
sWhereCondition=sWhereCondition & " AND [CourtDate] like '%" & CourtDate & "%'"
end if%>
<%'-------Getting Defendant
dim Defendant
Defendant=Request("Defendant")%>
<%if trim(Defendant) <>"" then
sWhereCondition=sWhereCondition & " AND [Defendant] like '%" & Defendant & "%'"
end if%>
<%'-------Getting Complaintant
dim Complaintant
Complaintant=Request("Complaintant")%>
<%if trim(Complaintant) <>"" then
sWhereCondition=sWhereCondition & " AND [Complaintant] like '%" & Complaintant & "%'"
end if%>
<%'-------Getting OffenseDate
dim OffenseDate
OffenseDate=Request("OffenseDate")%>
<%if trim(OffenseDate) <>"" then
sWhereCondition=sWhereCondition & " AND [OffenseDate] like '%" & OffenseDate & "%'"
end if%>
<%'-------Getting OffenseType
dim OffenseType
OffenseType=Request("OffenseType")%>
<%if trim(OffenseType) <>"" then
sWhereCondition=sWhereCondition & " AND [OffenseType] like '%" & OffenseType & "%'"
end if%>
<%'-------Getting Amount
dim Amount
Amount=Request("Amount")%>
<%if trim(Amount) <>"" then
sWhereCondition=sWhereCondition & " AND [Amount] like '%" & Amount & "%'"
end if%>
<%'-------Getting Disposition
dim Disposition
Disposition=Request("Disposition")%>
<%if trim(Disposition) <>"" then
sWhereCondition=sWhereCondition & " AND [Disposition] like '%" & Disposition & "%'"
end if%>
<table border=0><tr>
<%if sWhereCondition="" then
sSQL="SELECT * FROM [tblBC&SO]"
else
sWhereCondition = Right(sWhereCondition, Len(sWhereCondition) - 4)
sSQL="SELECT * FROM [tblBC&SO]" & " WHERE " & sWhereCondition
end if
if sort_id<>"" then
sSQL=sSQL & " ORDER BY [" & sort_id & "] " & sort_type
end if
%>
</tr>
<%dim objRst 'The Recordset object
Set objRst = Server.CreateObject("ADODB.Recordset")
objRst.CursorLocation = 3 'adUseClient
objRst.CursorType = 3 'adOpenStatic
objRst.ActiveConnection = con
' Open the recordset.
objRst.Open sSql
'Now Prepend the sData String
objRst.PageSize = 10
' The cachesize property sets the number of records that will be cached
' locally in memory.
objRst.CacheSize = objRst.PageSize
intPageCount = objRst.PageCount
intRecordCount = objRst.RecordCount
If CInt(intPage) > CInt(intPageCount) Then intPage = intPageCount
If CInt(intPage) <= 0 Then intPage = 1
' Make sure that the recordset is not empty. If it is not, then set the
' AbsolutePage property and populate the intStart and the intFinish variables.
If intRecordCount > 0 Then
objRst.AbsolutePage = intPage
intStart = objRst.AbsolutePosition
If CInt(intPage) = CInt(intPageCount) Then
intFinish = intRecordCount
Else
intFinish = intStart + (objRst.PageSize - 1)
End If
End If%>
<tr>
<td colspan=100 align=center>
<%=intRecordCount%> Data Available
<%If intRecordCount > 0 Then
' Display the record that you are starting on and the record
' that you are finishing on for this page by writing out the
' values in the intStart and the intFinish variables.
%>
<br>You are now viewing records
<%=intStart%> through <%=intFinish%>.
</td>
</tr>
<%
if not sort_id="IdNumber" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&CourtDate=<%=CourtDate%>&Defendant=<%=Defendant%>&Complaintant=<%=Complaintant%>&OffenseDate=<%=OffenseDate%>&OffenseType=<%=OffenseType%>&Amount=<%=Amount%>&Disposition=<%=Disposition%>&sortid=IdNumber&sorttype=<%=current_sort%>&NAV=<%=intPage %>">IdNumber <%=sSortSymbol%></a></th>
<%
if not sort_id="CourtDate" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&CourtDate=<%=CourtDate%>&Defendant=<%=Defendant%>&Complaintant=<%=Complaintant%>&OffenseDate=<%=OffenseDate%>&OffenseType=<%=OffenseType%>&Amount=<%=Amount%>&Disposition=<%=Disposition%>&sortid=CourtDate&sorttype=<%=current_sort%>&NAV=<%=intPage %>">CourtDate <%=sSortSymbol%></a></th>
<%
if not sort_id="Defendant" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&CourtDate=<%=CourtDate%>&Defendant=<%=Defendant%>&Complaintant=<%=Complaintant%>&OffenseDate=<%=OffenseDate%>&OffenseType=<%=OffenseType%>&Amount=<%=Amount%>&Disposition=<%=Disposition%>&sortid=Defendant&sorttype=<%=current_sort%>&NAV=<%=intPage %>">Defendant <%=sSortSymbol%></a></th>
<%
if not sort_id="Complaintant" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&CourtDate=<%=CourtDate%>&Defendant=<%=Defendant%>&Complaintant=<%=Complaintant%>&OffenseDate=<%=OffenseDate%>&OffenseType=<%=OffenseType%>&Amount=<%=Amount%>&Disposition=<%=Disposition%>&sortid=Complaintant&sorttype=<%=current_sort%>&NAV=<%=intPage %>">Complaintant <%=sSortSymbol%></a></th>
<%
if not sort_id="OffenseDate" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&CourtDate=<%=CourtDate%>&Defendant=<%=Defendant%>&Complaintant=<%=Complaintant%>&OffenseDate=<%=OffenseDate%>&OffenseType=<%=OffenseType%>&Amount=<%=Amount%>&Disposition=<%=Disposition%>&sortid=OffenseDate&sorttype=<%=current_sort%>&NAV=<%=intPage %>">OffenseDate <%=sSortSymbol%></a></th>
<%
if not sort_id="OffenseType" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&CourtDate=<%=CourtDate%>&Defendant=<%=Defendant%>&Complaintant=<%=Complaintant%>&OffenseDate=<%=OffenseDate%>&OffenseType=<%=OffenseType%>&Amount=<%=Amount%>&Disposition=<%=Disposition%>&sortid=OffenseType&sorttype=<%=current_sort%>&NAV=<%=intPage %>">OffenseType <%=sSortSymbol%></a></th>
<%
if not sort_id="Amount" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&CourtDate=<%=CourtDate%>&Defendant=<%=Defendant%>&Complaintant=<%=Complaintant%>&OffenseDate=<%=OffenseDate%>&OffenseType=<%=OffenseType%>&Amount=<%=Amount%>&Disposition=<%=Disposition%>&sortid=Amount&sorttype=<%=current_sort%>&NAV=<%=intPage %>">Amount <%=sSortSymbol%></a></th>
<%
if not sort_id="Disposition" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&CourtDate=<%=CourtDate%>&Defendant=<%=Defendant%>&Complaintant=<%=Complaintant%>&OffenseDate=<%=OffenseDate%>&OffenseType=<%=OffenseType%>&Amount=<%=Amount%>&Disposition=<%=Disposition%>&sortid=Disposition&sorttype=<%=current_sort%>&NAV=<%=intPage %>">Disposition <%=sSortSymbol%></a></th>
<th>Details</th>
<tr>
<%
dim i
dim iGroupId
%>
</tr>
<%
' Iterate through the recordset until we reach the end of the page
' or the last record in the recordset.
'need to write the following info for deleting the stuff
For intRecord = 1 to objRst.PageSize%>
<tr>
<td><%=objRst("IdNumber").Value%></td>
<td><%=objRst("CourtDate").Value%></td>
<td><%=objRst("Defendant").Value%></td>
<td><%=objRst("Complaintant").Value%></td>
<td><%=objRst("OffenseDate").Value%></td>
<td><%=objRst("OffenseType").Value%></td>
<td><%=objRst("Amount").Value%></td>
<td><%=objRst("Disposition").Value%></td>
<TD><a href="ml_results_detail.asp?IdNumber=<%=objRst("IdNumber")%>&mVarTable=[tblBC&SO]"> Detail </a></TD>
</tr>
<%objRst.MoveNext
If objRst.EOF Then Exit for
Next
%>
<%End IF%> <%
' Check to see if the current page is less than the last page
' in the recordset. If it is, then add a "Next" link.
%>
<tr align=center>
<td align=center colspan=30>
<%
if CInt(intPage)>1 then
%>
<a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&CourtDate=<%=CourtDate%>&Defendant=<%=Defendant%>&Complaintant=<%=Complaintant%>&OffenseDate=<%=OffenseDate%>&OffenseType=<%=OffenseType%>&Amount=<%=Amount%>&Disposition=<%=Disposition%>&sorttype=<%=sort_type%>&NAV=<%=intPage - 1%>&sortid=<%=sort_id%>">
<b><< Prev</b></a>
<%
end if
dim iCounter
for iCounter=1 to cint(intPageCount)
if not cInt(intPage)= iCounter then %>
<a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&CourtDate=<%=CourtDate%>&Defendant=<%=Defendant%>&Complaintant=<%=Complaintant%>&OffenseDate=<%=OffenseDate%>&OffenseType=<%=OffenseType%>&Amount=<%=Amount%>&Disposition=<%=Disposition%>&sorttype=<%=sort_type%>&NAV=<%=iCounter%>&sortid=<%=sort_id%>">
<b> <%=iCounter%> </b></a>
<% else%>
<b> <%=iCounter%> </b>
<% end if
next
If cInt(intPage) < cInt(intPageCount) Then
%> <a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&CourtDate=<%=CourtDate%>&Defendant=<%=Defendant%>&Complaintant=<%=Complaintant%>&OffenseDate=<%=OffenseDate%>&OffenseType=<%=OffenseType%>&Amount=<%=Amount%>&Disposition=<%=Disposition%>&sorttype=<%=sort_type%>&NAV=<%=intPage + 1%>&sortid=<%=sort_id%>">
<b>Next >></b></a>
<%End If%>
</td>
</tr>
</table></td>
<td width="10%"></td>
</tr>
<tr>
<td colspan="3" width="100%" bgcolor="#FF9900">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td bgcolor="#E6E6E6">
<p align="center"><font face="Tahoma" size="1" color="#0000FF">
<a href="mailto:asphelper@a2zhelp.com"><br>
</a>
</font></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
|
|
|
|
archangelwes
Posts: 39 Joined: 3/9/2006 Status: offline
|
RE: ++ ASP search Results Page - 3/10/2006 14:21:59
I have 3 files on is ml.asp the other is ml_results and the last is ml_results_detail.asp.. I am calling the ml.asp from an http site but not until the fiber wire is ran and we get the server its own IP address.. basically I need it to search fields from an access database display them and set them up as a link that will pull the search result detail page.. The search results page is the one giving me problems but if you would like I can post the other two pages on here as well.
|
|
|
|
archangelwes
Posts: 39 Joined: 3/9/2006 Status: offline
|
RE: ++ ASP search Results Page - 3/10/2006 14:23:05
untill then I am running the stuff off of my own computer.. I have the IIS set up and the files stored in a database folder in the wwwroot folder.
|
|
|
|
archangelwes
Posts: 39 Joined: 3/9/2006 Status: offline
|
RE: ++ ASP search Results Page - 3/10/2006 14:40:42
the ml.asp code is <html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Company" content="Kalptaru Infotech Ltd. [www.a2zhelp.com]">
<title>This page was generated using ASP Helper [www.a2zhelp.com]</title>
<style>
<!--
td { font-family: Tahoma; font-size: 8pt; background-color: #E6F2FF;
border-style: solid; border-width: 1 }
th { font-family: Tahoma; font-size: 8pt; font-weight: bold; background-color:
#E6E6E6; border: 1 outset #FF9900 }
input { font-family: Tahoma; font-size: 8pt; border: 1 inset #E6E6E6 }
table { }
-->
</style>
</head>
<body>
<table border="0" cellpadding="2" width="100%">
<tr>
<td colspan="3" width="100%">Search data using the following criteria</td>
</tr>
<tr>
<td width="10%"></td>
<td width="80%">
<form method="GET" action="ml_results.asp">
<table border="0" width="100%">
<tr><th colspan=2>Search data using the following criteria</th></tr>
<tr>
<td align="right" width="50%"><b>IdNumber</b></td>
<td width="50%"><input type="text" name="IdNumber"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>GroomLast</b></td>
<td width="50%"><input type="text" name="GroomLast"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>GroomFirst</b></td>
<td width="50%"><input type="text" name="GroomFirst"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>GroomAge</b></td>
<td width="50%"><input type="text" name="GroomAge"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>GroomStreetAddress</b></td>
<td width="50%"><input type="text" name="GroomStreetAddress"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>GroomCity</b></td>
<td width="50%"><input type="text" name="GroomCity"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>BrideLast</b></td>
<td width="50%"><input type="text" name="BrideLast"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>BrideFirst</b></td>
<td width="50%"><input type="text" name="BrideFirst"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>BrideAge</b></td>
<td width="50%"><input type="text" name="BrideAge"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>BrideStreetAddress</b></td>
<td width="50%"><input type="text" name="BrideStreetAddress"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>BrideCity</b></td>
<td width="50%"><input type="text" name="BrideCity"> </td>
</tr>
<td colspan="2" align="center">
<input type=submit value=Submit>
<input type=reset value=Clear>
</td></tr>
</table>
</form></td>
<td width="10%"></td>
</tr>
<tr>
<td colspan="3" width="100%" bgcolor="#FF9900">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td bgcolor="#E6E6E6">
<p align="center"> </td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
< Message edited by rdouglass -- 3/10/2006 15:18:04 >
|
|
|
|
archangelwes
Posts: 39 Joined: 3/9/2006 Status: offline
|
RE: ++ ASP search Results Page - 3/10/2006 14:42:01
and the ml_results_details.asp is <html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Company" content="Kalptaru Infotech Ltd. [www.a2zhelp.com]">
<title>ML</title>
<style>
<!--
td { font-family: Tahoma; font-size: 8pt; background-color: #E6F2FF;
border-style: solid; border-width: 1 }
th { font-family: Tahoma; font-size: 8pt; font-weight: bold; background-color:
#E6E6E6; border: 1 outset #FF9900 }
input { font-family: Tahoma; font-size: 8pt; border: 1 inset #E6E6E6 }
table { }
-->
</style>
</head>
<body>
<table border="0" cellpadding="2" width="100%">
<tr>
<td colspan="3" width="100%">Details</td>
</tr>
<tr>
<td width="10%"></td>
<td width="80%">
<%const DATABASE_NAME="MarriageLicenesdatabase.mdb"
dim Con
set Con=server.createobject("ADODB.Connection")
Con.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& server.mappath(DATABASE_NAME) & ";User Id=Admin;Password="
%>
<table border="0" width="100%">
<tr><th colspan=2>Details</th></tr>
<% dim sWhereCondition %>
<%'-------Getting TableName
dim mVarTable
mVarTable=Request("mVarTable")%>
<%'-------Getting IdNumber
dim IdNumber
IdNumber=Request("IdNumber")%>
<%if trim(IdNumber) <>"" then
sWhereCondition=sWhereCondition & " AND [IdNumber] like '%" & IdNumber & "%'"
end if%>
<%if sWhereCondition="" then
sSQL="SELECT * FROM FROM " & mVarTable
else
sWhereCondition = Right(sWhereCondition, Len(sWhereCondition) - 4)
sSQL="select * from " & mVarTable & " where " & sWhereCondition
end if
dim objRst 'The Recordset object
Set objRst = Server.CreateObject("ADODB.Recordset")
objRst.ActiveConnection = con
' Open the recordset.
objRst.Open sSql
%>
<tr>
<td align="right" width="50%"><b>IdNumber</b></td>
<td width="50%"><%=objRst("IdNumber")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>GroomLast</b></td>
<td width="50%"><%=objRst("GroomLast")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>GroomFirst</b></td>
<td width="50%"><%=objRst("GroomFirst")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>GroomAge</b></td>
<td width="50%"><%=objRst("GroomAge")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>GroomStreetAddress</b></td>
<td width="50%"><%=objRst("GroomStreetAddress")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>GroomCity</b></td>
<td width="50%"><%=objRst("GroomCity")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>BrideLast</b></td>
<td width="50%"><%=objRst("BrideLast")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>BrideFirst</b></td>
<td width="50%"><%=objRst("BrideFirst")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>BrideAge</b></td>
<td width="50%"><%=objRst("BrideAge")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>BrideStreetAddress</b></td>
<td width="50%"><%=objRst("BrideStreetAddress")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>BrideCity</b></td>
<td width="50%"><%=objRst("BrideCity")%></td>
</tr>
</table></td>
<td width="10%"></td>
</tr>
<tr>
<td colspan="3" width="100%" bgcolor="#FF9900">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td bgcolor="#E6E6E6">
<p align="center"><font face="Tahoma" size="1" color="#0000FF"><br>
</font></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
< Message edited by rdouglass -- 3/10/2006 15:17:43 >
|
|
|
|
archangelwes
Posts: 39 Joined: 3/9/2006 Status: offline
|
RE: ++ ASP search Results Page - 3/10/2006 14:47:04
I'm useing a program call ASP Helper to generate this code... I'd like to thank you though for helping me with my problems.
|
|
|
|
archangelwes
Posts: 39 Joined: 3/9/2006 Status: offline
|
RE: ++ ASP search Results Page - 3/10/2006 14:51:54
... ahh heck let me do this again I think I made a mistake on how this was displayed
|
|
|
|
archangelwes
Posts: 39 Joined: 3/9/2006 Status: offline
|
RE: ++ ASP search Results Page - 3/10/2006 14:52:58
The ml.asp (no problems) is <html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Company" content="Kalptaru Infotech Ltd. [www.a2zhelp.com]">
<title>This page was generated using ASP Helper [www.a2zhelp.com]</title>
<style>
<!--
td { font-family: Tahoma; font-size: 8pt; background-color: #E6F2FF;
border-style: solid; border-width: 1 }
th { font-family: Tahoma; font-size: 8pt; font-weight: bold; background-color:
#E6E6E6; border: 1 outset #FF9900 }
input { font-family: Tahoma; font-size: 8pt; border: 1 inset #E6E6E6 }
table { }
-->
</style>
</head>
<body>
<table border="0" cellpadding="2" width="100%">
<tr>
<td colspan="3" width="100%">Search data using the following criteria</td>
</tr>
<tr>
<td width="10%"></td>
<td width="80%">
<form method="GET" action="ml_results.asp">
<table border="0" width="100%">
<tr><th colspan=2>Search data using the following criteria</th></tr>
<tr>
<td align="right" width="50%"><b>IdNumber</b></td>
<td width="50%"><input type="text" name="IdNumber"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>GroomLast</b></td>
<td width="50%"><input type="text" name="GroomLast"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>GroomFirst</b></td>
<td width="50%"><input type="text" name="GroomFirst"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>GroomAge</b></td>
<td width="50%"><input type="text" name="GroomAge"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>GroomStreetAddress</b></td>
<td width="50%"><input type="text" name="GroomStreetAddress"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>GroomCity</b></td>
<td width="50%"><input type="text" name="GroomCity"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>BrideLast</b></td>
<td width="50%"><input type="text" name="BrideLast"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>BrideFirst</b></td>
<td width="50%"><input type="text" name="BrideFirst"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>BrideAge</b></td>
<td width="50%"><input type="text" name="BrideAge"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>BrideStreetAddress</b></td>
<td width="50%"><input type="text" name="BrideStreetAddress"> </td>
</tr>
<tr>
<td align="right" width="50%"><b>BrideCity</b></td>
<td width="50%"><input type="text" name="BrideCity"> </td>
</tr>
<td colspan="2" align="center">
<input type=submit value=Submit>
<input type=reset value=Clear>
</td></tr>
</table>
</form></td>
<td width="10%"></td>
</tr>
<tr>
<td colspan="3" width="100%" bgcolor="#FF9900">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td bgcolor="#E6E6E6">
<p align="center"> </td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
< Message edited by rdouglass -- 3/10/2006 15:17:18 >
|
|
|
|
archangelwes
Posts: 39 Joined: 3/9/2006 Status: offline
|
RE: ++ ASP search Results Page - 3/10/2006 14:53:47
the ml_results.asp page (the one giveing me the problems) is <html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Company" content="Kalptaru Infotech Ltd. [www.a2zhelp.com]">
<title>ML</title>
<style>
<!--
td { font-family: Tahoma; font-size: 8pt; background-color: #E6F2FF;
border-style: solid; border-width: 1 }
th { font-family: Tahoma; font-size: 8pt; font-weight: bold; background-color:
#E6E6E6; border: 1 outset #FF9900 }
input { font-family: Tahoma; font-size: 8pt; border: 1 inset #E6E6E6 }
table { }
-->
</style>
</head>
<body>
<table border="0" cellpadding="2" width="100%">
<tr>
<td colspan="3" width="100%">Search Results</td>
</tr>
<tr>
<td width="10%"></td>
<td width="80%">
<%const DATABASE_NAME="MarriageLicenesdatabase.mdb"
dim Con
set Con=server.createobject("ADODB.Connection")
Con.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& server.mappath(DATABASE_NAME) & ";User Id=Admin;Password="
%>
<%
Dim sort_id 'The variable to sort data
Dim intPage 'The variable to hold current page number
Dim sSQL 'The variable to hold the SQL Statement
Dim intPageCount 'The var to hold total page count
Dim intRecordCount 'The var to hold total records count
Dim intFinish 'The var to hold the last page count
Dim intStart 'The var to hold the first page count
Dim intRecord
Dim sort_type
Dim new_sort_type
'-------Getting Info of page Number-------------
sort_id=Request("sortid")
If Request.QueryString("NAV") = "" Then
intPage = 1
Else
intPage = Request.QueryString("NAV")
End If
sort_type = Request("sorttype")
dim sSortSymbol
dim sTempSymbol
dim current_sort
if ucase(sort_type)="DESC" then
sort_type="DESC"
new_sort_type="ASC"
sTempSymbol="[<FONT FACE=wingdings>ê</font>]"
else
sort_type="ASC"
new_sort_type="DESC"
sTempSymbol="[<FONT FACE=wingdings>é</font>]"
end if
dim sWhereCondition %>
<%'-------Getting IdNumber
dim IdNumber
IdNumber=Request("IdNumber")%>
<%if trim(IdNumber) <>"" then
sWhereCondition=sWhereCondition & " AND [IdNumber] like '%" & IdNumber & "%'"
end if%>
<%'-------Getting GroomLast
dim GroomLast
GroomLast=Request("GroomLast")%>
<%if trim(GroomLast) <>"" then
sWhereCondition=sWhereCondition & " AND [GroomLast] like '%" & GroomLast & "%'"
end if%>
<%'-------Getting GroomFirst
dim GroomFirst
GroomFirst=Request("GroomFirst")%>
<%if trim(GroomFirst) <>"" then
sWhereCondition=sWhereCondition & " AND [GroomFirst] like '%" & GroomFirst & "%'"
end if%>
<%'-------Getting GroomAge
dim GroomAge
GroomAge=Request("GroomAge")%>
<%if trim(GroomAge) <>"" then
sWhereCondition=sWhereCondition & " AND [GroomAge] like '%" & GroomAge & "%'"
end if%>
<%'-------Getting GroomStreetAddress
dim GroomStreetAddress
GroomStreetAddress=Request("GroomStreetAddress")%>
<%if trim(GroomStreetAddress) <>"" then
sWhereCondition=sWhereCondition & " AND [GroomStreetAddress] like '%" & GroomStreetAddress & "%'"
end if%>
<%'-------Getting GroomCity
dim GroomCity
GroomCity=Request("GroomCity")%>
<%if trim(GroomCity) <>"" then
sWhereCondition=sWhereCondition & " AND [GroomCity] like '%" & GroomCity & "%'"
end if%>
<%'-------Getting BrideLast
dim BrideLast
BrideLast=Request("BrideLast")%>
<%if trim(BrideLast) <>"" then
sWhereCondition=sWhereCondition & " AND [BrideLast] like '%" & BrideLast & "%'"
end if%>
<%'-------Getting BrideFirst
dim BrideFirst
BrideFirst=Request("BrideFirst")%>
<%if trim(BrideFirst) <>"" then
sWhereCondition=sWhereCondition & " AND [BrideFirst] like '%" & BrideFirst & "%'"
end if%>
<%'-------Getting BrideAge
dim BrideAge
BrideAge=Request("BrideAge")%>
<%if trim(BrideAge) <>"" then
sWhereCondition=sWhereCondition & " AND [BrideAge] like '%" & BrideAge & "%'"
end if%>
<%'-------Getting BrideStreetAddress
dim BrideStreetAddress
BrideStreetAddress=Request("BrideStreetAddress")%>
<%if trim(BrideStreetAddress) <>"" then
sWhereCondition=sWhereCondition & " AND [BrideStreetAddress] like '%" & BrideStreetAddress & "%'"
end if%>
<%'-------Getting BrideCity
dim BrideCity
BrideCity=Request("BrideCity")%>
<%if trim(BrideCity) <>"" then
sWhereCondition=sWhereCondition & " AND [BrideCity] like '%" & BrideCity & "%'"
end if%>
<table border=0><tr>
<%if sWhereCondition="" then
sSQL="SELECT * FROM [tblMarriageLicenses]"
else
sWhereCondition = Right(sWhereCondition, Len(sWhereCondition) - 4)
sSQL="SELECT * FROM [tblMarriageLicenses]" & " WHERE " & sWhereCondition
end if
if sort_id<>"" then
sSQL=sSQL & " ORDER BY [" & sort_id & "] " & sort_type
end if
%>
</tr>
<%dim objRst 'The Recordset object
Set objRst = Server.CreateObject("ADODB.Recordset")
objRst.CursorLocation = 3 'adUseClient
objRst.CursorType = 3 'adOpenStatic
objRst.ActiveConnection = con
' Open the recordset.
objRst.Open sSql
'Now Prepend the sData String
objRst.PageSize = 10
' The cachesize property sets the number of records that will be cached
' locally in memory.
objRst.CacheSize = objRst.PageSize
intPageCount = objRst.PageCount
intRecordCount = objRst.RecordCount
If CInt(intPage) > CInt(intPageCount) Then intPage = intPageCount
If CInt(intPage) <= 0 Then intPage = 1
' Make sure that the recordset is not empty. If it is not, then set the
' AbsolutePage property and populate the intStart and the intFinish variables.
If intRecordCount > 0 Then
objRst.AbsolutePage = intPage
intStart = objRst.AbsolutePosition
If CInt(intPage) = CInt(intPageCount) Then
intFinish = intRecordCount
Else
intFinish = intStart + (objRst.PageSize - 1)
End If
End If%>
<tr>
<td colspan=100 align=center>
<%=intRecordCount%> Data Available
<%If intRecordCount > 0 Then
' Display the record that you are starting on and the record
' that you are finishing on for this page by writing out the
' values in the intStart and the intFinish variables.
%>
<br>You are now viewing records
<%=intStart%> through <%=intFinish%>.
</td>
</tr>
<%
if not sort_id="IdNumber" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=IdNumber&sorttype=<%=current_sort%>&NAV=<%=intPage %>">IdNumber <%=sSortSymbol%></a></th>
<%
if not sort_id="GroomLast" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=GroomLast&sorttype=<%=current_sort%>&NAV=<%=intPage %>">GroomLast <%=sSortSymbol%></a></th>
<%
if not sort_id="GroomFirst" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=GroomFirst&sorttype=<%=current_sort%>&NAV=<%=intPage %>">GroomFirst <%=sSortSymbol%></a></th>
<%
if not sort_id="GroomAge" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=GroomAge&sorttype=<%=current_sort%>&NAV=<%=intPage %>">GroomAge <%=sSortSymbol%></a></th>
<%
if not sort_id="GroomStreetAddress" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=GroomStreetAddress&sorttype=<%=current_sort%>&NAV=<%=intPage %>">GroomStreetAddress <%=sSortSymbol%></a></th>
<%
if not sort_id="GroomCity" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=GroomCity&sorttype=<%=current_sort%>&NAV=<%=intPage %>">GroomCity <%=sSortSymbol%></a></th>
<%
if not sort_id="BrideLast" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=BrideLast&sorttype=<%=current_sort%>&NAV=<%=intPage %>">BrideLast <%=sSortSymbol%></a></th>
<%
if not sort_id="BrideFirst" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=BrideFirst&sorttype=<%=current_sort%>&NAV=<%=intPage %>">BrideFirst <%=sSortSymbol%></a></th>
<%
if not sort_id="BrideAge" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=BrideAge&sorttype=<%=current_sort%>&NAV=<%=intPage %>">BrideAge <%=sSortSymbol%></a></th>
<%
if not sort_id="BrideStreetAddress" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=BrideStreetAddress&sorttype=<%=current_sort%>&NAV=<%=intPage %>">BrideStreetAddress <%=sSortSymbol%></a></th>
<%
if not sort_id="BrideCity" then
sSortSymbol=""
current_sort= "ASC"
else
sSortSymbol= sTempSymbol
current_sort= new_sort_type
End If
%>
<th nowrap><a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sortid=BrideCity&sorttype=<%=current_sort%>&NAV=<%=intPage %>">BrideCity <%=sSortSymbol%></a></th>
<th>Details</th>
<tr>
<%
dim i
dim iGroupId
%>
</tr>
<%
' Iterate through the recordset until we reach the end of the page
' or the last record in the recordset.
'need to write the following info for deleting the stuff
For intRecord = 1 to objRst.PageSize%>
<tr>
<td><%=objRst("IdNumber").Value%></td>
<td><%=objRst("GroomLast").Value%></td>
<td><%=objRst("GroomFirst").Value%></td>
<td><%=objRst("GroomAge").Value%></td>
<td><%=objRst("GroomStreetAddress").Value%></td>
<td><%=objRst("GroomCity").Value%></td>
<td><%=objRst("BrideLast").Value%></td>
<td><%=objRst("BrideFirst").Value%></td>
<td><%=objRst("BrideAge").Value%></td>
<td><%=objRst("BrideStreetAddress").Value%></td>
<td><%=objRst("BrideCity").Value%></td>
<TD><a href="ml_results_detail.asp?IdNumber=<%=objRst("IdNumber")%>&mVarTable=[tblMarriageLicenses]"> Detail </a></TD>
</tr>
<%objRst.MoveNext
If objRst.EOF Then Exit for
Next
%>
<%End IF%> <%
' Check to see if the current page is less than the last page
' in the recordset. If it is, then add a "Next" link.
%>
<tr align=center>
<td align=center colspan=30>
<%
if CInt(intPage)>1 then
%>
<a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sorttype=<%=sort_type%>&NAV=<%=intPage - 1%>&sortid=<%=sort_id%>">
<b><< Prev</b></a>
<%
end if
dim iCounter
for iCounter=1 to cint(intPageCount)
if not cInt(intPage)= iCounter then %>
<a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sorttype=<%=sort_type%>&NAV=<%=iCounter%>&sortid=<%=sort_id%>">
<b> <%=iCounter%> </b></a>
<% else%>
<b> <%=iCounter%> </b>
<% end if
next
If cInt(intPage) < cInt(intPageCount) Then %>
<a href="<%=Request.ServerVariables("PATH_INFO")%>?IdNumber=<%=IdNumber%>&GroomLast=<%=GroomLast%>&GroomFirst=<%=GroomFirst%>&GroomAge=<%=GroomAge%>&GroomStreetAddress=<%=GroomStreetAddress%>&GroomCity=<%=GroomCity%>&BrideLast=<%=BrideLast%>&BrideFirst=<%=BrideFirst%>&BrideAge=<%=BrideAge%>&BrideStreetAddress=<%=BrideStreetAddress%>&BrideCity=<%=BrideCity%>&sorttype=<%=sort_type%>&NAV=<%=intPage + 1%>&sortid=<%=sort_id%>">
<b>Next >></b></a>
<%End If%>
</td>
</tr>
</table></td>
<td width="10%"></td>
</tr>
<tr>
<td colspan="3" width="100%" bgcolor="#FF9900">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td bgcolor="#E6E6E6">
<p align="center"><font face="Tahoma" size="1" color="#0000FF"><br>
</font></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
< Message edited by rdouglass -- 3/10/2006 15:17:01 >
|
|
|
|
archangelwes
Posts: 39 Joined: 3/9/2006 Status: offline
|
RE: ++ ASP search Results Page - 3/10/2006 14:55:00
and the ml_results_detail.asp (working as far as I know) is <html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Company" content="Kalptaru Infotech Ltd. [www.a2zhelp.com]">
<title>ML</title>
<style>
<!--
td { font-family: Tahoma; font-size: 8pt; background-color: #E6F2FF;
border-style: solid; border-width: 1 }
th { font-family: Tahoma; font-size: 8pt; font-weight: bold; background-color:
#E6E6E6; border: 1 outset #FF9900 }
input { font-family: Tahoma; font-size: 8pt; border: 1 inset #E6E6E6 }
table { }
-->
</style>
</head>
<body>
<table border="0" cellpadding="2" width="100%">
<tr>
<td colspan="3" width="100%">Details</td>
</tr>
<tr>
<td width="10%"></td>
<td width="80%">
<%const DATABASE_NAME="../../../documents and settings/wesley beavers/desktop/designed groop 1/filler/BC&SOdatabase.mdb"
dim Con
set Con=server.createobject("ADODB.Connection")
Con.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& server.mappath(DATABASE_NAME) & ";User Id=Admin;Password="
%>
<table border="0" width="100%">
<tr><th colspan=2>Details</th></tr>
<% dim sWhereCondition %>
<%'-------Getting TableName
dim mVarTable
mVarTable=Request("mVarTable")%>
<%'-------Getting IdNumber
dim IdNumber
IdNumber=Request("IdNumber")%>
<%if trim(IdNumber) <>"" then
sWhereCondition=sWhereCondition & " AND [IdNumber] like '%" & IdNumber & "%'"
end if%>
<%if sWhereCondition="" then
sSQL="SELECT * FROM FROM " & mVarTable
else
sWhereCondition = Right(sWhereCondition, Len(sWhereCondition) - 4)
sSQL="select * from " & mVarTable & " where " & sWhereCondition
end if
dim objRst 'The Recordset object
Set objRst = Server.CreateObject("ADODB.Recordset")
objRst.ActiveConnection = con
' Open the recordset.
objRst.Open sSql
%>
<tr>
<td align="right" width="50%"><b>IdNumber</b></td>
<td width="50%"><%=objRst("IdNumber")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>CourtDate</b></td>
<td width="50%"><%=objRst("CourtDate")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>Defendant</b></td>
<td width="50%"><%=objRst("Defendant")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>Complaintant</b></td>
<td width="50%"><%=objRst("Complaintant")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>OffenseDate</b></td>
<td width="50%"><%=objRst("OffenseDate")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>OffenseType</b></td>
<td width="50%"><%=objRst("OffenseType")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>Amount</b></td>
<td width="50%"><%=objRst("Amount")%></td>
</tr>
<tr>
<td align="right" width="50%"><b>Disposition</b></td>
<td width="50%"><%=objRst("Disposition")%></td>
</tr>
</table></td>
<td width="10%"></td>
</tr>
<tr>
<td colspan="3" width="100%" bgcolor="#FF9900">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td bgcolor="#E6E6E6">
| |