Forums
This topic is locked
Classic ASP Paging Error!!!!!! Pl help me
28 Mar 2008 21:20:09 phyu aung posted:
I write these two asp pages with micromedia dreamweaver 8.I got the ASP paging error!!!
<b> Error type!!!! "ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. "</b>
Index.asp
////////////
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<%
// *** Logout the current user.
MM_Logout = String(Request.ServerVariables("URL") + "?MM_Logoutnow=1";
if (String(Request("MM_Logoutnow")=="1" {
Session.Contents.Remove("MM_Username"
Session.Contents.Remove("MM_UserAuthorization"
var MM_logoutRedirectPage = "Thankyou.asp";
// redirect with URL parameters (remove the "MM_Logoutnow" query param).
if (MM_logoutRedirectPage == "" MM_logoutRedirectPage = String(Request.ServerVariables("URL");
if (String(MM_logoutRedirectPage).indexOf("?" == -1 && Request.QueryString != "" {
var MM_newQS = "?";
for (var items=new Enumerator(Request.QueryString); !items.atEnd(); items.moveNext()) {
if (String(items.item()) != "MM_Logoutnow" {
if (MM_newQS.length > 1) MM_newQS += "&";
MM_newQS += items.item() + "=" + Server.URLencode(Request.QueryString(items.item()));
}
}
if (MM_newQS.length > 1) MM_logoutRedirectPage += MM_newQS;
}
Response.Redirect(MM_logoutRedirectPage);
}
%>
<!--#include file="Connections/WatchGallery.asp" -->
<!--#include file="Connections/WatchGallery.asp" -->
<%
var Recordset1 = Server.CreateObject("ADODB.Recordset"
Recordset1.ActiveConnection = MM_WatchGallery_STRING;
Recordset1.Source = "SELECT wrefno, wname, price, brandid FROM WatchInfo";
Recordset1.CursorType = 0;
Recordset1.CursorLocation = 2;
Recordset1.LockType = 1;
Recordset1.Open();
var Recordset1_numRows = 0;
%>
<%
var Recordset2 = Server.CreateObject("ADODB.Recordset"
Recordset2.ActiveConnection = MM_WatchGallery_STRING;
Recordset2.Source = "SELECT * FROM BrandInfo";
Recordset2.CursorType = 0;
Recordset2.CursorLocation = 2;
Recordset2.LockType = 1;
Recordset2.Open();
var Recordset2_numRows = 0;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="www.w3.org/1999/xhtml">
<head>
<script language="javascript" >var imageclock=new Object()
//Enter path to clock digit images here, in order of 0-9, then "am/pm", then colon image:
imageclock.digits=["clockimages/c0.gif", "clockimages/c1.gif", "clockimages/c2.gif", "clockimages/c3.gif", "clockimages/c4.gif", "clockimages/c5.gif", "clockimages/c6.gif", "clockimages/c7.gif", "clockimages/c8.gif", "clockimages/c9.gif", "clockimages/cam.gif", "clockimages/cpm.gif", "clockimages/colon.gif"]
imageclock.instances=0
var preloadimages=[]
for (var i=0; i<imageclock.digits.length; i++){ //preload images
preloadimages[i]=new Image()
preloadimages[i].src=imageclock.digits[i]
}
imageclock.imageHTML=function(timestring){ //return timestring (ie: 1:56:38) into string of images instead
var sections=timestring.split(":"
if (sections[0]=="0" //If hour field is 0 (aka 12 AM)
sections[0]="12"
else if (sections[0]>=13)
sections[0]=sections[0]-12+""
for (var i=0; i<sections.length; i++){
if (sections[i].length==1)
sections[i]='<img src="'+imageclock.digits[0]+'" />'+'<img src="'+imageclock.digits[parseInt(sections[i])]+'" />'
else
sections[i]='<img src="'+imageclock.digits[parseInt(sections[i].charAt(0))]+'" />'+'<img src="'+imageclock.digits[parseInt(sections[i].charAt(1))]+'" />'
}
return sections[0]+'<img src="'+imageclock.digits[12]+'" />'+sections[1]+'<img src="'+imageclock.digits[12]+'" />'+sections[2]
}
imageclock.display=function(){
var clockinstance=this
this.spanid="clockspan"+(imageclock.instances++)
document.write('<span id="'+this.spanid+'"></span>')
this.update()
setInterval(function(){clockinstance.update()}, 1000)
}
imageclock.display.prototype.update=function(){
var dateobj=new Date()
var currenttime=dateobj.getHours()+":"+dateobj.getMinutes()+":"+dateobj.getSeconds() //create time string
var currenttimeHTML=imageclock.imageHTML(currenttime)+'<img src="'+((dateobj.getHours()>=12)? imageclock.digits[11] : imageclock.digits[10])+'" />'
document.getElementById(this.spanid).innerHTML=currenttimeHTML
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Watch Gallery</title>
<link rel="stylesheet" href="css/global.css" type="text/css" />
</head>
<body>
<table align="center" width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20"> </td>
</tr>
<tr>
<td><img src="images/homebanner.jpg" width="800" height="120" /></td>
</tr>
<tr>
<td>
<div id="menu">
<ul>
<li><a href="Index.asp">Home</a></li>
<li><a href="SiteMap.asp">Site Map</a></li>
<li><a href="Company.asp">The Company </a></li>
<li><a href="Watches.asp">Watches</a></li>
<li><a href="Information.asp">Infromation</a></li>
<li><a href="Login.asp">Log In </a></li>
<li><a href="Contact.asp">Contact</a></li>
</ul>
</div> </td>
</tr>
<tr>
<td>
<table width="800" border="1" cellspacing="0" cellpadding="0" bgcolor="#FBFBFB">
<tr>
<td bgcolor="#000033" valign="top" align="center"> <script language="javascript">new imageclock.display()</script></td>
<td bgcolor="#000033" valign="top"><h3 align="right"><a href="<%= MM_Logout %>">Log out</a> </h3> </tr>
<tr>
<td width="158" valign="top">
<form name="form1" id="form1" method="post" action="SearchCheck.asp">
<table width="200" border="0">
<tr>
<td colspan="2" bgcolor="#CCCCCC" height="20"><div align="center"><strong>Watch Search</strong></div></td>
</tr>
<tr>
<td width="70"><div align="right">Make:</div></td>
<td width="94"><select name="MDropList">
<%
while (!Recordset2.EOF) {
%><option value="<%=(Recordset2.Fields.Item("brandid".Value)%>"><%=(Recordset2.Fields.Item("brandname".Value)%></option><%
Recordset2.MoveNext();
}
if (Recordset2.CursorType > 0) {
if (!Recordset2.BOF) Recordset2.MoveFirst();
} else {
Recordset2.Requery();
}
%>
</select></td>
</tr>
<tr>
<td><div align="right">Gender:</div></td>
<td><select name="GDropList" id="GDropList" tabindex="2" onkeydown="if (window.event.keyCode==13){document.form1.submit();}">
<option value="1">Either</option>
<option value="2">Men</option>
<option value="3">Ladies</option>
</select></td>
</tr>
<tr>
<td> </td>
<td><input name="Submit" type="submit" id="Submit" value="Search" /></td>
</tr>
</table>
</form>
<form name="specform1" id="specform1" method="post" action="Detail.asp">
<table width="200" border="0">
<tr>
<td height="20" bgcolor="#CCCCCC"><div align="center"><strong>Special Offer </strong></div></td>
</tr>
<tr>
<td><img src="Images/CA003s.jpg" width="200" height="200" /></td>
</tr>
<tr>
<td><div align="center">Cartier </div></td>
</tr>
<tr>
<td><div align="center"><reflabel>CA003</reflabel></div></td>
</tr>
<tr>
<td><div align="center">Men's Francaise Watch </div></td>
</tr>
<tr>
<td><div align="center">S$ 3492 </div></td>
</tr>
<tr>
<td><div align="center">
<input type="submit" name="Submit" value="Info" />
</div></td>
</tr>
</table>
</form>
<hr width="200"/>
<form name="specform2" id="specform2" method="post" action="Detail.asp">
<table width="200" border="0">
<tr>
<td height="210"><img src="Images/SW003s.jpg" width="200" height="200" /></td>
</tr>
<tr>
<td><div align="center">Swatch</div></td>
</tr>
<tr>
<td><div align="center"><reflabel>SW003</reflabel>
</div></td>
</tr>
<tr>
<td><div align="center">LULUDIA</div></td>
</tr>
<tr>
<td><div align="center"> S$ 105 </div></td>
</tr>
<tr>
<td><div align="center">
<input type="submit" name="Submit" value="Info" />
</div></td>
</tr>
</table>
</form></td>
<td width="636" valign="top">
<form action="SearchCheck.asp" method="post" id="watchesform" name="watchesform">
<table width="591" border="0">
<tr>
<td colspan="4" bgcolor="#CCCCCC" height="20"><strong>Available Watches</strong> </td>
</tr>
<tr><td> </td></tr>
<tr>
<td width="138"><div align="center"><img src="Images/Omega.jpg" width="68" height="90" longdesc="Images/Omega.jpg" /></div></td>
<td width="143"><div align="center"><img src="Images/Guess.jpg" width="58" height="90" longdesc="Images/Guess.jpg" /></div></td>
<td width="128"><div align="center"><img src="Images/Cartier.jpg" width="69" height="82" longdesc="Images/Cartier.jpg" /></div></td>
<td width="163"><div align="center"><img src="Images/Swatch.jpg" width="62" height="90" longdesc="Images/Swatch.jpg" /></div></td>
</tr>
<tr>
<td><div align="center"><label><a href="SearchCheck.asp">Omega</a></label>
</div></td>
<td><div align="center"><label><a href="SearchCheck.asp">Guess</a></label></div></td>
<td><div align="center"><label></label>
<label><a href="SearchCheck.asp">Cartier</a></label>
</div></td>
<td><div align="center"><label><a href="SearchCheck.asp">Swatch</a></label></div></td>
</tr>
</table>
</form>
<hr width="590"/> </tr>
</table> </td>
</tr>
<tr>
<td height="3"></td>
</tr>
<tr>
<td height="30" bgcolor="#000033" align="center"><font color="#FFFFFF">WatchGallery@2008</font></td>
</tr>
</table>
</body>
</html>
<%
Recordset1.Close();
%>
<%
Recordset2.Close();
%>
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
SearchCheck.asp
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<%
// *** Logout the current user.
MM_Logout = String(Request.ServerVariables("URL") + "?MM_Logoutnow=1";
if (String(Request("MM_Logoutnow")=="1" {
Session.Contents.Remove("MM_Username"
Session.Contents.Remove("MM_UserAuthorization"
var MM_logoutRedirectPage = "Thankyou.asp";
// redirect with URL parameters (remove the "MM_Logoutnow" query param).
if (MM_logoutRedirectPage == "" MM_logoutRedirectPage = String(Request.ServerVariables("URL");
if (String(MM_logoutRedirectPage).indexOf("?" == -1 && Request.QueryString != "" {
var MM_newQS = "?";
for (var items=new Enumerator(Request.QueryString); !items.atEnd(); items.moveNext()) {
if (String(items.item()) != "MM_Logoutnow" {
if (MM_newQS.length > 1) MM_newQS += "&";
MM_newQS += items.item() + "=" + Server.URLencode(Request.QueryString(items.item()));
}
}
if (MM_newQS.length > 1) MM_logoutRedirectPage += MM_newQS;
}
Response.Redirect(MM_logoutRedirectPage);
}
%>
<!--#include file="Connections/WatchGallery.asp" -->
<!--#include file="Connections/WatchGallery.asp" -->
<%
var Recordset1 = Server.CreateObject("ADODB.Recordset"
Recordset1.ActiveConnection = MM_WatchGallery_STRING;
Recordset1.Source = "SELECT wrefno, wname, price, brandid FROM WatchInfo";
Recordset1.CursorType = 0;
Recordset1.CursorLocation = 2;
Recordset1.LockType = 1;
Recordset1.Open();
var Recordset1_numRows = 0;
%>
<%
var Recordset2 = Server.CreateObject("ADODB.Recordset"
Recordset2.ActiveConnection = MM_WatchGallery_STRING;
Recordset2.Source = "SELECT * FROM BrandInfo";
Recordset2.CursorType = 0;
Recordset2.CursorLocation = 2;
Recordset2.LockType = 1;
Recordset2.Open();
var Recordset2_numRows = 0;
%>
<%
var Recordset3 = Server.CreateObject("ADODB.Recordset"
var bdid
Recordset3.ActiveConnection = MM_WatchGallery_STRING;
bid= String (Request.Form("MDropList");
Recordset3.Source = "SELECT * FROM BrandInfo WHERE brandid='"+bid+"'";
Recordset3.CursorType = 0;
Recordset3.CursorLocation = 2;
Recordset3.LockType = 1;
Recordset3.Open();
var Recordset3_numRows = 0;
%>
<%
var Recordset4 = Server.CreateObject("ADODB.Recordset"
var Make, Gender;
Recordset4.ActiveConnection = MM_WatchGallery_STRING;
Make= String (Request.Form("MDropList");
Gender= String (Request.Form("GDropList");
if (Gender=="1"
{ Recordset4.Source = "SELECT * FROM WatchInfo WHERE brandid = '"+Make+"'";}
else if (Gender=="2"
{ Recordset4.Source = "SELECT * FROM WatchInfo WHERE brandid = '"+Make+"' and gender='Men'";}
else
{ Recordset4.Source = "SELECT * FROM WatchInfo WHERE brandid = '"+Make+"' and gender='Ladies'";}
Recordset4.CursorType = 0;
Recordset4.CursorLocation = 2;
Recordset4.LockType = 1;
Recordset4.Open();
var Recordset4_numRows = 0;
%>
<%
var Repeat1__numRows = 2;
var Repeat1__index = 0;
Recordset4_numRows += Repeat1__numRows;
%>
<%
// *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
// set the record count
var Recordset4_total = Recordset4.RecordCount;
// set the number of rows displayed on this page
if (Recordset4_numRows < 0) { // if repeat region set to all records
Recordset4_numRows = Recordset4_total;
} else if (Recordset4_numRows == 0) { // if no repeat regions
Recordset4_numRows = 1;
}
// set the first and last displayed record
var Recordset4_first = 1;
var Recordset4_last = Recordset4_first + Recordset4_numRows - 1;
// if we have the correct record count, check the other stats
if (Recordset4_total != -1) {
Recordset4_numRows = Math.min(Recordset4_numRows, Recordset4_total);
Recordset4_first = Math.min(Recordset4_first, Recordset4_total);
Recordset4_last = Math.min(Recordset4_last, Recordset4_total);
}
%>
<% var MM_paramName = ""; %>
<%
// *** Move To Record and Go To Record: declare variables
var MM_rs = Recordset4;
var MM_rsCount = Recordset4_total;
var MM_size = Recordset4_numRows;
var MM_uniqueCol = "";
MM_paramName = "";
var MM_offset = 0;
var MM_atTotal = false;
var MM_paramIsDefined = (MM_paramName != "" && String(Request(MM_paramName)) != "undefined"
%>
<%
// *** Move To Record: handle 'index' or 'offset' parameter
if (!MM_paramIsDefined && MM_rsCount != 0) {
// use index parameter if defined, otherwise use offset parameter
r = String(Request("index");
if (r == "undefined" r = String(Request("offset");
if (r && r != "undefined" MM_offset = parseInt(r);
// if we have a record count, check if we are past the end of the recordset
if (MM_rsCount != -1) {
if (MM_offset >= MM_rsCount || MM_offset == -1) { // past end or move last
if ((MM_rsCount % MM_size) != 0) { // last page not a full repeat region
MM_offset = MM_rsCount - (MM_rsCount % MM_size);
} else {
MM_offset = MM_rsCount - MM_size;
}
}
}
// move the cursor to the selected record
for (var i=0; !MM_rs.EOF && (i < MM_offset || MM_offset == -1); i++) {
MM_rs.MoveNext();
}
if (MM_rs.EOF) MM_offset = i; // set MM_offset to the last possible record
}
%>
<%
// *** Move To Record: if we dont know the record count, check the display range
if (MM_rsCount == -1) {
// walk to the end of the display range for this page
for (var i=MM_offset; !MM_rs.EOF && (MM_size < 0 || i < MM_offset + MM_size); i++) {
MM_rs.MoveNext();
}
// if we walked off the end of the recordset, set MM_rsCount and MM_size
if (MM_rs.EOF) {
MM_rsCount = i;
if (MM_size < 0 || MM_size > MM_rsCount) MM_size = MM_rsCount;
}
// if we walked off the end, set the offset based on page size
if (MM_rs.EOF && !MM_paramIsDefined) {
if ((MM_rsCount % MM_size) != 0) { // last page not a full repeat region
MM_offset = MM_rsCount - (MM_rsCount % MM_size);
} else {
MM_offset = MM_rsCount - MM_size;
}
}
// reset the cursor to the beginning
if (MM_rs.CursorType > 0) {
if (!MM_rs.BOF) MM_rs.MoveFirst();
} else {
MM_rs.Requery();
}
// move the cursor to the selected record
for (var i=0; !MM_rs.EOF && i < MM_offset; i++) {
MM_rs.MoveNext();
}
}
%>
<%
// *** Move To Record: update recordset stats
// set the first and last displayed record
Recordset4_first = MM_offset + 1;
Recordset4_last = MM_offset + MM_size;
if (MM_rsCount != -1) {
Recordset4_first = Math.min(Recordset4_first, MM_rsCount);
Recordset4_last = Math.min(Recordset4_last, MM_rsCount);
}
// set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount != -1 && MM_offset + MM_size >= MM_rsCount);
%>
<%
// *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
// create the list of parameters which should not be maintained
var MM_removeList = "&index=";
if (MM_paramName != "" MM_removeList += "&" + MM_paramName.toLowerCase() + "=";
var MM_keepURL="",MM_keepForm="",MM_keepBoth="",MM_keepNone="";
// add the URL parameters to the MM_keepURL string
for (var items=new Enumerator(Request.QueryString); !items.atEnd(); items.moveNext()) {
var nextItem = "&" + items.item().toLowerCase() + "=";
if (MM_removeList.indexOf(nextItem) == -1) {
MM_keepURL += "&" + items.item() + "=" + Server.URLencode(Request.QueryString(items.item()));
}
}
// add the Form variables to the MM_keepForm string
for (var items=new Enumerator(Request.Form); !items.atEnd(); items.moveNext()) {
var nextItem = "&" + items.item().toLowerCase() + "=";
if (MM_removeList.indexOf(nextItem) == -1) {
MM_keepForm += "&" + items.item() + "=" + Server.URLencode(Request.Form(items.item()));
}
}
// create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL + MM_keepForm;
if (MM_keepBoth.length > 0) MM_keepBoth = MM_keepBoth.substring(1);
if (MM_keepURL.length > 0) MM_keepURL = MM_keepURL.substring(1);
if (MM_keepForm.length > 0) MM_keepForm = MM_keepForm.substring(1);
%>
<%
// *** Move To Record: set the strings for the first, last, next, and previous links
var MM_moveFirst="",MM_moveLast="",MM_moveNext="",MM_movePrev="";
var MM_keepMove = MM_keepBoth; // keep both Form and URL parameters for moves
var MM_moveParam = "index";
// if the page has a repeated region, remove 'offset' from the maintained parameters
if (MM_size > 1) {
MM_moveParam = "offset";
if (MM_keepMove.length > 0) {
params = MM_keepMove.split("&"
MM_keepMove = "";
for (var i=0; i < params.length; i++) {
var nextItem = params[i].substring(0,params[i].indexOf("=");
if (nextItem.toLowerCase() != MM_moveParam) {
MM_keepMove += "&" + params[i];
}
}
if (MM_keepMove.length > 0) MM_keepMove = MM_keepMove.substring(1);
}
}
// set the strings for the move to links
if (MM_keepMove.length > 0) MM_keepMove = Server.HTMLEncode(MM_keepMove) + "&";
var urlStr = Request.ServerVariables("URL" + "?" + MM_keepMove + MM_moveParam + "=";
MM_moveFirst = urlStr + "0";
MM_moveLast = urlStr + "-1";
MM_moveNext = urlStr + (MM_offset + MM_size);
MM_movePrev = urlStr + Math.max(MM_offset - MM_size,0);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="www.w3.org/1999/xhtml">
<head>
<script language="javascript" >var imageclock=new Object()
//Enter path to clock digit images here, in order of 0-9, then "am/pm", then colon image:
imageclock.digits=["clockimages/c0.gif", "clockimages/c1.gif", "clockimages/c2.gif", "clockimages/c3.gif", "clockimages/c4.gif", "clockimages/c5.gif", "clockimages/c6.gif", "clockimages/c7.gif", "clockimages/c8.gif", "clockimages/c9.gif", "clockimages/cam.gif", "clockimages/cpm.gif", "clockimages/colon.gif"]
imageclock.instances=0
var preloadimages=[]
for (var i=0; i<imageclock.digits.length; i++){ //preload images
preloadimages[i]=new Image()
preloadimages[i].src=imageclock.digits[i]
}
imageclock.imageHTML=function(timestring){ //return timestring (ie: 1:56:38) into string of images instead
var sections=timestring.split(":"
if (sections[0]=="0" //If hour field is 0 (aka 12 AM)
sections[0]="12"
else if (sections[0]>=13)
sections[0]=sections[0]-12+""
for (var i=0; i<sections.length; i++){
if (sections[i].length==1)
sections[i]='<img src="'+imageclock.digits[0]+'" />'+'<img src="'+imageclock.digits[parseInt(sections[i])]+'" />'
else
sections[i]='<img src="'+imageclock.digits[parseInt(sections[i].charAt(0))]+'" />'+'<img src="'+imageclock.digits[parseInt(sections[i].charAt(1))]+'" />'
}
return sections[0]+'<img src="'+imageclock.digits[12]+'" />'+sections[1]+'<img src="'+imageclock.digits[12]+'" />'+sections[2]
}
imageclock.display=function(){
var clockinstance=this
this.spanid="clockspan"+(imageclock.instances++)
document.write('<span id="'+this.spanid+'"></span>')
this.update()
setInterval(function(){clockinstance.update()}, 1000)
}
imageclock.display.prototype.update=function(){
var dateobj=new Date()
var currenttime=dateobj.getHours()+":"+dateobj.getMinutes()+":"+dateobj.getSeconds() //create time string
var currenttimeHTML=imageclock.imageHTML(currenttime)+'<img src="'+((dateobj.getHours()>=12)? imageclock.digits[11] : imageclock.digits[10])+'" />'
document.getElementById(this.spanid).innerHTML=currenttimeHTML
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Watch Gallery</title>
<link rel="stylesheet" href="css/global.css" type="text/css" />
</head>
<body>
<table align="center" width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20"> </td>
</tr>
<tr>
<td><img src="images/homebanner.jpg" width="800" height="120" /></td>
</tr>
<tr>
<td>
<div id="menu">
<ul>
<li><a href="Index.asp">Home</a></li>
<li><a href="SiteMap.asp">Site Map</a></li>
<li><a href="Company.asp">The Company </a></li>
<li><a href="Watches.asp">Watches</a></li>
<li><a href="Information.asp">Infromation</a></li>
<li><a href="Login.asp">Log In </a></li>
<li><a href="Contact.asp">Contact</a></li>
</ul>
</div> </td>
</tr>
<tr>
<td>
<table width="800" border="1" cellspacing="0" cellpadding="0" bgcolor="#FBFBFB">
<tr>
<td bgcolor="#000033" valign="top" align="center"> <script language="javascript">new imageclock.display()</script></td>
<td bgcolor="#000033" valign="top"><h3 align="right"><a href="<%= MM_Logout %>">Log out</a> </h3> </tr>
<tr>
<td width="158" valign="top">
<form name="form1" id="form1" method="post" action="SearchCheck.asp">
<table width="200" border="0">
<tr>
<td colspan="2" bgcolor="#CCCCCC" height="20"><div align="center"><strong>Watch Search</strong></div></td>
</tr>
<tr>
<td width="70"><div align="right">Make:</div></td>
<td width="94"><select name="MDropList">
<%
while (!Recordset2.EOF) {
%><option value="<%=(Recordset2.Fields.Item("brandid".Value)%>"><%=(Recordset2.Fields.Item("brandname".Value)%></option><%
Recordset2.MoveNext();
}
if (Recordset2.CursorType > 0) {
if (!Recordset2.BOF) Recordset2.MoveFirst();
} else {
Recordset2.Requery();
}
%>
</select></td>
</tr>
<tr>
<td><div align="right">Gender:</div></td>
<td><select name="GDropList" id="GDropList" tabindex="2" onkeydown="if (window.event.keyCode==13){document.form1.submit();}">
<option value="1">Either</option>
<option value="2">Men</option>
<option value="3">Ladies</option>
</select></td>
</tr>
<tr>
<td> </td>
<td><input name="Submit" type="submit" id="Submit" value="Search" /></td>
</tr>
</table>
</form>
<form name="specform1" id="specform1" method="post" action="Detail.asp">
<table width="200" border="0">
<tr>
<td height="20" bgcolor="#CCCCCC"><div align="center"><strong>Special Offer </strong></div></td>
</tr>
<tr>
<td><img src="Images/CA003s.jpg" width="200" height="200" /></td>
</tr>
<tr>
<td><div align="center">Cartier </div></td>
</tr>
<tr>
<td><div align="center"><reflabel>CA003</reflabel></div></td>
</tr>
<tr>
<td><div align="center">Men's Francaise Watch </div></td>
</tr>
<tr>
<td><div align="center">S$ 3492 </div></td>
</tr>
<tr>
<td><div align="center">
<input type="submit" name="Submit" value="Info" />
</div></td>
</tr>
</table>
</form>
<hr width="200"/>
<form name="specform2" id="specform2" method="post" action="Detail.asp">
<table width="200" border="0">
<tr>
<td height="210"><img src="Images/SW003s.jpg" width="200" height="200" /></td>
</tr>
<tr>
<td><div align="center">Swatch</div></td>
</tr>
<tr>
<td><div align="center"><reflabel>SW003</reflabel>
</div></td>
</tr>
<tr>
<td><div align="center">LULUDIA</div></td>
</tr>
<tr>
<td><div align="center"> S$ 105 </div></td>
</tr>
<tr>
<td><div align="center">
<input type="submit" name="Submit" value="Info" />
</div></td>
</tr>
</table>
</form></td>
<td width="636" valign="top">
<form action="" method="post" id="watchesform" name="watchesform">
<table width="591" border="0">
<tr>
<td width="572" height="20" bgcolor="#CCCCCC"><div align="center"><h1>Search Result for <%=(Recordset3.Fields.Item("brandname".Value)%></h1></div></td>
</tr>
<tr>
<td height="20"> </td>
</tr>
</table>
</form>
<% while ((Repeat1__numRows-- != 0) && (!Recordset4.EOF)) { %>
<form action="Deatail.asp" method="post" name="SListForm">
<table width="590" border="1">
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="2"><div align="center"><%=(Recordset4.Fields.Item("wname".Value)%></div></td>
<td width="184" rowspan="7"><img src="Images/<%=(Recordset4.Fields.Item("smallimage".Value)%>"/></td>
</tr>
<tr>
<td colspan="2"><div align="center"><%=(Recordset4.Fields.Item("description".Value)%></div>
<div align="center"></div></td>
</tr>
<tr>
<td width="164"><div align="right"> Our Price: </div></td>
<td width="220"><%=(Recordset4.Fields.Item("price".Value)%></td>
</tr>
<tr>
<td><div align="right">Watch Ref no: </div></td>
<td><%=(Recordset4.Fields.Item("wrefno".Value)%></td>
</tr>
<tr>
<td><div align="right">Condition:</div></td>
<td><%=(Recordset4.Fields.Item("condition".Value)%></td>
</tr>
<tr>
<td><div align="right">Gender:</div></td>
<td><%=(Recordset4.Fields.Item("gender".Value)%></td>
</tr>
<tr>
<td><div align="right">RRP:</div></td>
<td><%=(Recordset4.Fields.Item("rrprice".Value)%></td>
</tr>
<tr>
<td><div align="right">Status:</div></td>
<td><%=(Recordset4.Fields.Item("status".Value)%></td>
<td><div align="center">
<input type="submit" name="Submit2" value="Detail" />
</div></td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
</table>
</form>
<%
Repeat1__index++;
Recordset4.MoveNext();
}
%>
<p> </p>
<p> </p>
<table border="0" width="50%" align="center">
<tr>
<td width="23%" align="center"><% if (MM_offset != 0) { %>
<a href="<%=MM_moveFirst%>"><img src="First.gif" border=0></a>
<% } // end MM_offset != 0 %>
</td>
<td width="31%" align="center"><% if (MM_offset != 0) { %>
<a href="<%=MM_movePrev%>"><img src="Previous.gif" border=0></a>
<% } // end MM_offset != 0 %>
</td>
<td width="23%" align="center"><% if (!MM_atTotal) { %>
<a href="<%=MM_moveNext%>"><img src="Next.gif" border=0></a>
<% } // end !MM_atTotal %>
</td>
<td width="23%" align="center"><% if (!MM_atTotal) { %>
<a href="<%=MM_moveLast%>"><img src="Last.gif" border=0></a>
<% } // end !MM_atTotal %>
</td>
</tr>
</table>
</tr>
</table> </td>
</tr>
<tr>
<td height="3"></td>
</tr>
<tr>
<td height="30" bgcolor="#000033" align="center"><font color="#FFFFFF">WatchGallery@2008</font></td>
</tr>
</table>
</body>
</html>
<%
Recordset1.Close();
%>
<%
Recordset2.Close();
%>
<%
Recordset3.Close();
%>
<%
Recordset4.Close();
%>
Who can point out the error for me?
Thanks you.
reagards,
phyu