Thanks for your reply
After taking the two lines out i'm now getting a new error message.
The page now opens but it doesn't shows the data
Error message:
ADODB.Fieldserror '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal. /l/a/o/laoclondon/Classified Advert Search Return.asp, line 388
This is me new codes:
CODE
1<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
2<!--#include file="Connections/Classified.asp" -->
3<%
4Dim Recordset1
5Dim Recordset1_numRows
6
7set oConnection=Server.CreateObject("ADODB.Connection" )
8oConnection.Provider="Microsoft.Jet.OLEDB.4.0"
9oConnection.Open(Server.Mappath("database/Classified Advert.mdb"))
10
11Create an ADO RecordSet object
12Set Recordset1 = Server.CreateObject("ADODB.Recordset")
13Recordset1.Source = "SELECT * FROM Table1"
14Recordset1.CursorType = 0
15Recordset1.CursorLocation = 2
16Recordset1.LockType = 1
17
18
19Recordset1_numRows = 0
20%>
21<%
22*** Recordset Stats, Move To Record, and Go To Record: declare stats variables
23
24Dim Recordset1_total
25Dim Recordset1_first
26Dim Recordset1_last
27
28set the record count
29
30
31set the number of rows displayed on this page
32If (Recordset1_numRows < 0) Then
33Recordset1_numRows = Recordset1_total
34Elseif (Recordset1_numRows = 0) Then
35Recordset1_numRows = 1
36End If
37
38set the first and last displayed record
39Recordset1_first = 1
40Recordset1_last = Recordset1_first + Recordset1_numRows - 1
41
42if we have the correct record count, check the other stats
43If (Recordset1_total <> -1) Then
44If (Recordset1_first > Recordset1_total) Then
45Recordset1_first = Recordset1_total
46End If
47If (Recordset1_last > Recordset1_total) Then
48Recordset1_last = Recordset1_total
49End If
50If (Recordset1_numRows > Recordset1_total) Then
51Recordset1_numRows = Recordset1_total
52End If
53End If
54%>
55<%
56Dim MM_paramName
57%>
58<%
59*** Move To Record and Go To Record: declare variables
60
61Dim MM_rs
62Dim MM_rsCount
63Dim MM_size
64Dim MM_uniqueCol
65Dim MM_offset
66Dim MM_atTotal
67Dim MM_paramIsDefined
68
69Dim MM_param
70Dim MM_index
71
72Set MM_rs = Recordset1
73MM_rsCount = Recordset1_total
74MM_size = Recordset1_numRows
75MM_uniqueCol = ""
76MM_paramName = ""
77MM_offset = 0
78MM_atTotal = false
79MM_paramIsDefined = false
80If (MM_paramName <> "") Then
81MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
82End If
83%>
84<%
85*** Move To Record: handle 'index' or 'offset' parameter
86
87if (Not MM_paramIsDefined And MM_rsCount <> 0) then
88
89' use index parameter if defined, otherwise use offset parameter
90MM_param = Request.QueryString("index")
91If (MM_param = "") Then
92MM_param = Request.QueryString("offset")
93End If
94If (MM_param <> "") Then
95MM_offset = Int(MM_param)
96End If
97
98' if we have a record count, check if we are past the end of the recordset
99If (MM_rsCount <> -1) Then
100If (MM_offset >= MM_rsCount Or MM_offset = -1) Then ' past end or move last
101If ((MM_rsCount Mod MM_size) > 0) Then ' last page not a full repeat region
102MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
103Else
104MM_offset = MM_rsCount - MM_size
105End If
106End If
107End If
108
109' move the cursor to the selected record
110MM_index = 0
111While ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1))
112MM_rs.MoveNext
113MM_index = MM_index + 1
114Wend
115If (MM_rs.EOF) Then
116MM_offset = MM_index ' set MM_offset to the last possible record
117End If
118
119End If
120%>
121<%
122*** Move To Record: if we dont know the record count, check the display range
123
124If (MM_rsCount = -1) Then
125
126' walk to the end of the display range for this page
127MM_index = MM_offset
128While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
129MM_rs.MoveNext
130MM_index = MM_index + 1
131Wend
132
133' if we walked off the end of the recordset, set MM_rsCount and MM_size
134If (MM_rs.EOF) Then
135MM_rsCount = MM_index
136If (MM_size < 0 Or MM_size > MM_rsCount) Then
137MM_size = MM_rsCount
138End If
139End If
140
141' if we walked off the end, set the offset based on page size
142If (MM_rs.EOF And Not MM_paramIsDefined) Then
143If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
144If ((MM_rsCount Mod MM_size) > 0) Then
145MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
146Else
147MM_offset = MM_rsCount - MM_size
148End If
149End If
150End If
151
152' reset the cursor to the beginning
153If (MM_rs.CursorType > 0) Then
154MM_rs.MoveFirst
155Else
156MM_rs.Requery
157End If
158
159' move the cursor to the selected record
160MM_index = 0
161While (Not MM_rs.EOF And MM_index < MM_offset)
162MM_rs.MoveNext
163MM_index = MM_index + 1
164Wend
165End If
166%>
167<%
168*** Move To Record: update recordset stats
169
170set the first and last displayed record
171Recordset1_first = MM_offset + 1
172Recordset1_last = MM_offset + MM_size
173
174If (MM_rsCount <> -1) Then
175If (Recordset1_first > MM_rsCount) Then
176Recordset1_first = MM_rsCount
177End If
178If (Recordset1_last > MM_rsCount) Then
179Recordset1_last = MM_rsCount
180
181End If
182End If
183
184set the boolean used by hide region to check if we are on the last record
185MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
186%>
187<%
188*** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
189
190Dim MM_keepNone
191Dim MM_keepURL
192Dim MM_keepForm
193Dim MM_keepBoth
194
195Dim MM_removeList
196Dim MM_item
197Dim MM_nextItem
198
199create the list of parameters which should not be maintained
200MM_removeList = "&index="
201If (MM_paramName <> "") Then
202MM_removeList = MM_removeList & "&" & MM_paramName & "="
203End If
204
205MM_keepURL=""
206MM_keepForm=""
207MM_keepBoth=""
208MM_keepNone=""
209
210add the URL parameters to the MM_keepURL string
211For Each MM_item In Request.QueryString
212MM_nextItem = "&" & MM_item & "="
213If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
214MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
215End If
216Next
217
218add the Form variables to the MM_keepForm string
219For Each MM_item In Request.Form
220MM_nextItem = "&" & MM_item & "="
221If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
222MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
223End If
224Next
225
226create the Form + URL string and remove the intial '&' from each of the strings
227MM_keepBoth = MM_keepURL & MM_keepForm
228If (MM_keepBoth <> "") Then
229MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
230End If
231If (MM_keepURL <> "") Then
232MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
233End If
234If (MM_keepForm <> "") Then
235MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
236End If
237
238a utility function used for adding additional parameters to these strings
239Function MM_joinChar(firstItem)
240If (firstItem <> "") Then
241MM_joinChar = "&"
242Else
243MM_joinChar = ""
244End If
245End Function
246%>
247<%
248*** Move To Record: set the strings for the first, last, next, and previous links
249
250Dim MM_keepMove
251Dim MM_moveParam
252Dim MM_moveFirst
253Dim MM_moveLast
254Dim MM_moveNext
255Dim MM_movePrev
256
257Dim MM_urlStr
258Dim MM_paramList
259Dim MM_paramIndex
260Dim MM_nextParam
261
262MM_keepMove = MM_keepBoth
263MM_moveParam = "index"
264
265if the page has a repeated region, remove 'offset' from the maintained parameters
266If (MM_size > 1) Then
267MM_moveParam = "offset"
268If (MM_keepMove <> "") Then
269MM_paramList = Split(MM_keepMove, "&")
270MM_keepMove = ""
271For MM_paramIndex = 0 To UBound(MM_paramList)
272MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)
273If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
274MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
275End If
276Next
277If (MM_keepMove <> "") Then
278MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
279End If
280End If
281End If
282
283set the strings for the move to links
284If (MM_keepMove <> "") Then
285MM_keepMove = MM_keepMove & "&"
286End If
287
288MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
289
290MM_moveFirst = MM_urlStr & "0"
291MM_moveLast = MM_urlStr & "-1"
292MM_moveNext = MM_urlStr & CStr(MM_offset + MM_size)
293If (MM_offset - MM_size < 0) Then
294MM_movePrev = MM_urlStr & "0"
295Else
296MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
297End If
298%>
299<html>
300<head>
301<title>London Adult Online Community</title>
302<!-- meta information for search engines -->
303<meta name="generator" content="Nucleus CMS v3.32" />
304<meta name="name" content="London Adult Online Community" />
305<meta name="description" content="" />
306<link rel="bookmark" title="Nucleus" href="http://nucleuscms.org/" />
307<link rel="archives" title="Archives" href="index.htm?archivelist=1" />
308<link rel="top" title="Today" href="index.htm?blogid=1" />
309<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
310</head>
311
312<body>
313<table width="866" border="2" cellpadding="3" cellspacing="0" bordercolor="#CCCCCC">
314<tr>
315<td width="500" bgcolor="#0099FF"><div align="center"><strong><font color="#FFFFFF" size="4" face="Verdana, Arial, Helvetica, sans-serif">LONDON
316ADULT ONLINE COMMUNITY</font></strong></div></td>
317<td width="125"><img src="lOGO/ben.jpg" width="146" height="115" /></td>
318<td width="125"><img src="lOGO/Parliament.jpg" width="150" height="115" /></td>
319<td width="125"><img src="lOGO/Tower%20Bridge.jpg" width="135" height="115" /></td>
320</tr>
321</table>
322</p>
323<p>
324<table width="866" border="2" cellpadding="3" cellspacing="0" bgcolor="#0099FF">
325<tr>
326<td width="280"><font color="#333333"><strong><a href="LondonAdultOnlineCommunityHomePage.asp">Home </a></strong></font></td>
327<td width="280"><font color="#333333"><strong><a href="Classified%20Advert%20Homepage.asp">Classifi ed
328Advert</a></strong></font></td>
329<td width="280"><font color="#333333"><strong><a href="Classified%20Advert.asp">Place
330an Advert</a></strong></font></td>
331<td width="280"><font color="#333333"><strong><a href="Classified%20Advert%20Search%20Return.asp">S earch
332Classified Adverts</a></strong></font></td>
333</tr>
334</table>
335<table width="866" height="55" border="2" cellpadding="3" cellspacing="0" bgcolor="#33FF33">
336<tr>
337<td width="247" height="51" bgcolor="#33FF33"> <form method="get" action="index.htm">
338<div class="searchform"> <strong>
339<input type="hidden" name="amount" value="0" />
340<input type="hidden" name="blogid" value="1" />
341<input name="query" alt="Keywords to search" class="formfield" size="10" maxlength="60" accesskey="4" value="" />
342<input name="submit" type="submit" class="formbutton" value="Search" alt="Search" />
343</strong></div>
344</form></td>
345<td width="78" height="51" valign="top" bgcolor="#33FF33"><font color="#333333"><strong><font color="#333333"><strong><a href="log%20in.asp">Login</a></strong></font></strong></font></td>
346<td width="119" height="51" valign="top" bgcolor="#33FF33"><font color="#333333"><strong><font color="#333333"><strong><a href="membership%20registration.asp">Membership</a>
347</strong></font></strong></font></td>
348<td width="133" height="51" align="right" valign="top" bgcolor="#33FF33"><font color="#333333"><font color="#333333"><strong>Font
349Size </strong></font></font></td>
350<td width="73" height="51" border="2"> <form class="accessiblity textSmall" method="post" action="Accessibility%20Statement.htm">
351<input type="hidden" name="TextSize2" value="small"/>
352<font color="#333333"><strong>
353<input name="submit2" type="submit" value="Small"/>
354</strong></font> </form></td>
355<td width="84" height="51" border="2"> <form class="accessiblity textMedium" method="post" action="/Accessibility%20Statementmeduim.htm">
356<font color="#333333"><strong>
357<input type="hidden" name="TextSize" value="medium"/>
358<input name="submit3" type="submit" value="Medium"/>
359</strong><font size=""></font></font> </form></td>
360<td width="72" height="51"> <form class="accessiblity textLarge" method="post" action="Accessibility%20Statement.htm">
361<font color="#33FF33"><strong>
362<input type="hidden" name="TextSize" value="large"/>
363<input name="submit4" type="submit" value="Large"/>
364</strong></font> </form></td>
365</tr>
366</table>
367<p> </p>
368<p><font color="#333333">Search and view the free London Adult Online Community
369Classified Adverts </font> </p>
370<p><font color="#333333">All of our Classified content are easily accessible and
371online</font></p>
372<p><font color="#333333">You can see anything in our classified adverts, Buy tables,
373sofas, fridges, television online</font></p>
374<p><font color="#333333"> </font></p>
375<p><font size="4"><strong>Search Classified Adverts</strong></font></p>
376<form action="" method="post" name="Advert" id="Advert">
377<table width="866" border="2" cellpadding="3" cellspacing="0">
378<tr>
379<td width="200" height="25" bgcolor="#00CCFF"><A HREF="<%=MM_moveFirst%>"><strong>First</strong></A></td>
380
<td width="200" height="25" bgcolor="#00FF66"><a href="<%=MM_movePrev%>"><font color="#333333"><strong>Previous</strong></font></a></td>381
<td width="200" height="25" bgcolor="#00CCFF"><a href="<%=MM_moveNext%>"><strong>Next</strong></a></td>382<td width="200" bgcolor="#00FF66"><A HREF="<%=MM_moveLast%>"><strong>Last</strong></A></td>
383</table>
384
<p> </p>385<table width="866" border="2" cellpadding="3" cellspacing="0">
386<tr>
387<td width="200" height="25" bgcolor="#00CCFF"><font color="#333333">Item</font></td>
388<td width="200" height="25" bgcolor="#00FF66"><font color="#333333"><%=(Recordset1.Fields.Item("Item") .Value)%></font></td>
389<td width="200" height="25" bgcolor="#00CCFF"><font color="#333333">Category
390Type</font></td>
391<td width="200" bgcolor="#00FF66"><font color="#333333"><%=(Recordset1.Fields.Item("Catego ry Type").Value)%> </font></td>
392</table>
393<table width="866" border="2" cellpadding="3" cellspacing="0">
394<tr>
395<td width="200" height="50" valign="top" bgcolor="#00CCFF"><font color="#333333">Photo</font></td>
396<td width="200" bgcolor="#00FF66"><font color="#333333"><%=(Recordset1.Fields.Item("Photo" ).Value)%></font> </td>
397
<td width="200" valign="top" bgcolor="#00CCFF"><font color="#333333">Description 398</font></td>
399
<td width="200" bgcolor="#00FF66"><font color="#333333"><%=(Recordset1.Fields.Item("Descri ption").Value)%></font> </td>400</table>
401<table width="866" border="2" cellpadding="3" cellspacing="0">
402<tr>
403<td width="200" height="25" bgcolor="#00CCFF"><font color="#333333">Price</font></td>
404<td width="200" bgcolor="#00FF66"><font color="#333333"><%=(Recordset1.Fields.Item("Price" ).Value)%></font> </td>
405
<td width="200" bgcolor="#00CCFF"><font color="#333333">Town </font></td>406
<td width="200" bgcolor="#00FF66"><font color="#333333"><%=(Recordset1.Fields.Item("Town") .Value)%></font> </td>407</table>
408<table width="866" border="2" cellpadding="3" cellspacing="0">
409<tr>
410<td width="200" height="25" bgcolor="#00CCFF"><font color="#333333">Contact
411Details</font></td>
412<td width="200" bgcolor="#00FF66"><font color="#333333"><%=(Recordset1.Fields.Item("Contac t Details").Value)%> </font></td>
413<td width="200" bgcolor="#00CCFF"><font color="#333333">Publish Date </font></td>
414<td width="200" bgcolor="#00FF66"><font color="#333333"><%=(Recordset1.Fields.Item("Publis h Date").Value)%> </font></td>
415</table>
416</form>
417<p> </p>
418<table width="866" border="2" cellpadding="3" cellspacing="0">
419<tr>
420<td width="125" height="75" ><a href="http://www.ivillage.co.uk/homegarden"><img src="lOGO/iVillage_logo1.jpg" width="370" height="100" border="0"></a></td>
421<td width="125"><a href="http://www.loot.com/"><img src="lOGO/loots%20logo.gif" width="154" height="91" border="0"></a></td>
422
<td width="150"><a href="http://www.cargiant.co.uk/"><img src="lOGO/car%20giant.gif" width="216" height="117" border="0"></a></td>423
</table>424<p> </p>
425
426<table width="866" border="2" cellpadding="3" cellspacing="0">
427<tr>
428<td width="125"><strong><font color="#333333"><a href="Mission%20Statement.htm">Mission
429Statement</a></font></strong></td>
430<td width="125"><strong><font color="#333333"><a href="Contact%20Us.asp">Contact
431us</a></font></strong></td>
432<td width="125"><strong><font color="#333333"><a href="Terms%20and%20Conditions.htm">Terms
433& Conditions</a></font></strong></td>
434<td width="125"><strong><font color="#333333"><a href="Privacy%20Policy.htm">Privacy
435Policy</a></font></strong></td>
436<td width="125"><strong><font color="#333333"><a href="Accessibility%20Statement.htm">Accessibility </a></font></strong></td>
437</table>
438Copyright © 2009 by London Adult Online Community. All Rights Reserved </p>
439</body>
440</html>
441<%
442Recordset1.Close()
443Set Recordset1 = Nothing
444%>