Reply LinkBack Thread Tools Search this Thread
Old 23-05-2007, 15:29   #1 (permalink)
pagey
Senior Member
 
pagey's Avatar
 
Join Date: Aug 2006
Posts: 389
Object Required error (SQL and ASP)

Hi there,

I'm having a few issues with an ASP website I'm trying to build.

Basically, its connected to a database in MS Access (I know its not the best choice, but the database is only small) and I have a number of different SQL commands, coupled with ASP to make an ASP e-commerce type site.

I have managed to get products displayed in the basket table of my database, and I need to do the same with products that are found within the 'search' function.

So I have a table displaying items that have been found through the search. This table looks like this:

Code:
<table border="1"> <tr class="green" align="center"> <tr> <th>Make</th> <th>Name</th> <th>Price</th> <th>&nbsp;</th> <th>&nbsp;</th> <th>&nbsp;</th> </tr> <%Do While Not RSlist.EOF%> <tr> <form name="insert1" action="insert.asp" method="POST"> <td><%Response.Write(RSList("ProductMake"))%></td> <td><%Response.Write(RSList("ProductName"))%></td> <td><%Response.Write(RSList("ProductPrice"))%></td> <td><img src="<%Response.Write(RSList("ProductImage"))%>"></td> <td><select name="Quantity" size="1"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> </select> </td> <td><input type="submit" value="Add"></td> </form> </tr> <%RSlist.MoveNext loop%> </table>

The SQL statement to generate these items looks like this:

Code:
Query="SELECT * FROM Products WHERE GenderCode = 1 AND ProductMake LIKE '%"&results&"%'"

Now the search works perfectly. But when I try and add them to the basket (a separate table in my database), I get an arror saying 'Object Required ".' It also generates a line that the error is on. I have been using the Insert Record feature of Dreamweaver (again, I know its not the best way to do things, but its worked on the other pages, and its the only way I know!)

I'd like to know how to handcode the Insert. I can do this without problem when the information is coming from fields within a form, but when they are search results, I'm a bit lost. I guess I need to know how to post the search results from the first page into the second page.

I hope this makes sense, and I'm sorry for rambling on, but any help would be very much appreciated.

Thanks

Neil
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8