Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADODB.Fields (0x800A0CC1)

Status
Not open for further replies.

shamsm

ISP
Jul 16, 2002
15
0
0
GB
Hi

I am developing a website using ASP VB Script, I was using an Access Database to begin with but then decided to switch over to MySQL as I found out was some what superior. After swaping over the recordset I keep getting the following error, do you think that the error could be due to the code? your help will be greatly appreciated, I have also enclosed the code that I get the error for.

Thanks

Error Type:
ADODB.Fields (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name
or ordinal.
/mysite.com/TMPaagfzl3qc.asp, line 469

The code is:

460 <div align=&quot;center&quot;>
461 <%
462 ' *** Show Image If Available
463 ' *** RobGT Server Behaviour 107 - By RobGT - ***
464 If (Rslts.Fields.Item(&quot;Image1surl&quot;).Value) <> &quot;&quot; Then%>
465 <img src =
&quot;<%=(Rslts.Fields.Item(&quot;Image1surl&quot;).Value)%>&quot;>
466 <%Else%>
467 <img src
=&quot;../../shamsrealty.co.uk/site_images/nophoto_1s.jpg&quot;>
468 <% End If %>
469 </div>
 
I think this is the code you mean

Thanks for your reply

<%
set Rslts = Server.CreateObject(&quot;ADODB.Recordset&quot;)
Rslts.ActiveConnection = MM_connSqlproperty_STRING
Rslts.Source = &quot;SELECT property.*,location.Location,proptype.PType FROM property,location,proptype WHERE property.LocationID=location.LocationID and property.PTypeID=proptype.PTypeID and Location LIKE '&quot; + Replace(Rslts__varLoc, &quot;'&quot;, &quot;''&quot;) + &quot;' AND PType LIKE '&quot; + Replace(Rslts__varType, &quot;'&quot;, &quot;''&quot;) + &quot;' AND Euro BETWEEN &quot; + Replace(Rslts__varPrcmin, &quot;'&quot;, &quot;''&quot;) + &quot; AND &quot; + Replace(Rslts__varPrcmax, &quot;'&quot;, &quot;''&quot;) + &quot; AND Beds>= &quot; + Replace(Rslts__varBedmin, &quot;'&quot;, &quot;''&quot;) + &quot; AND PropertyRef Like '&quot; + Replace(Rslts__varPropertyRef, &quot;'&quot;, &quot;''&quot;) + &quot;'&quot;
Rslts.CursorType = 0
Rslts.CursorLocation = 2
Rslts.LockType = 3
Rslts.Open()
Rslts_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = 5
Dim Repeat1__index
Repeat1__index = 0
Rslts_numRows = Rslts_numRows + Repeat1__numRows
%>
 
Is &quot;Image1surl&quot; a column in the property table? If not, that is why you are getting the Item not found error.

 
I managed to sort the problem out it wasn't the code, It was the WYSIWYG editor meesing things about, when I started over it all worked fine.

Thanks for trying

Cheers
Mehdi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top