Thread: Chapter 15!!
View Single Post
  #16 (permalink)  
Old March 12th, 2004, 07:03 AM
studentinpain studentinpain is offline
Authorized User
 
Join Date: Mar 2004
Location: Plymouth, , United Kingdom.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello, right we are up to having most things working BUT when we try to 'browselistings' we keep getting this error:

Microsoft VBScript runtime error '800a01a8'

Object required

/goinggoinggone/browselistings.asp, line 47

The file it refers to is below, with line 47 in red;


<HTML>
<HEAD>
<TITLE>Going Going GONE!!</TITLE>
</HEAD>

<BODY BGCOLOR="#003399" body bgproperties="fixed" background="backpic.jpg">
<BASEFONT FACE="Verdana" COLOR="#FF6600">
<CENTER><H1>Going Going GONE!! 'For Sale...'</CENTER>
<p><img border="0" src="logo.bmp" width="50" height="50"></p>

<CENTER><a href="MenuForRegisteredUsers.asp"><img border="0" src="Home.png" width="120" height="19"></a><a href="login.asp"><img border="0" src="Login.png" width="120" height="19"></a><a href="Register.asp"><img border="0" src="Register.png" width="120" height="19"></a><a href="browselistings.asp"><img border="0" src="Browse.png" width="120" height="19"></a><a href="http://www.guistuff.com/"><img border="0" src="http://www.guistuff.com/images/11dot.gif" width="1" height="1"></a><CENTER>
<%
  If Session("PersonID") <> "" Then
    Response.Write "<H3>Welcome " & Session("GivenName") & "</H3>"
  End If
%>
</CENTER>
<P>Here's a list of all the items that our users have made available for purchase:
</P>
<%
  Dim rsItems
  strSQL = "SELECT * FROM Item " & _
           "WHERE ExpirationDate > #" & FormatDateTime(Now,2) & "# " & _
           "AND ItemStatus = 'Active';"
  Set rsItems = Server.CreateObject("ADODB.Recordset")
  rsItems.Open strSQL, objConn

  If Not rsItems.EOF Then
    Response.Write _
      "<TABLE BORDER=""1"" CELLSPACING=""3"" CELLPADDING=""3"">" & _
      " <TR>" & _
      " <TH>Item ID"
               If Session("PersonID") <> "" Then
                 Response.Write "<BR>Click to Bid"
               End If
           Response.Write "</TH>" & _
      " <TH>Name</TH>" & _
      " <TH>Asking Price</TH>" & _
      " <TH>Listing Date</TH>" & _
      " <TH>Current Bid</TH>" & _
      " <TH>Bid Time</TH>" & _
      " </TR>"
       Response.Write "</TABLE>"
    rsItems.close
    Set rsItems = Nothing
 Do While Not rsItems.EOF <--------------------
      Response.Write "<TR ALIGN=CENTER>"
      If Session("PersonID") <> "" Then
        Response.Write _
          "<TD><A HREF=""Bid.asp?Item=" & rsItems("ItemID") & """>" & _
          rsItems("ItemID") & "</A></TD>"
      Else
        Response.Write "<TD>" & rsItems("ItemID") & "</TD>"
      End If
      Response.Write _
        "<TD>" & rsItems("ItemName") & "</TD>" & _
        "<TD>" & FormatCurrency(rsItems("AskingPrice")) & "</TD>" & _
        "<TD>" & FormatDateTime(rsItems("ListingDate"),2) & "</TD>" & _
      "</TR>"
      rsItems.MoveNext
    Loop
  Else
    Response.Write "<CENTER><H2>No items currently for sale</H2></CENTER>"
  End If
%>
<P>

</BODY>
</HTML>



We are unsure what 'object' is required, any help will be gratefully recieved! Thanks in advance