Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SAM's E-commerce 21 days - problem with 'Search'

0 views
Skip to first unread message

Otto Leholt

unread,
Mar 17, 2001, 4:45:45 AM3/17/01
to
Hello world ;-)
I'm building a e-shop using SAMS E-commerce in 21 days.
But I'm having a problem ( not surprised..) with listing 7.4 where you
create a search formular, for searching the productlist.
I get this error in the browser :

Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/hca-shop/search.asp, line 100

Here is the code I use around line 100 ( same as in the book page 155)
<%
sqlString = "SELECT product_id, product_picture, product_name,
product_briefDesc " &_
"FROM Products " &_
"WHERE product_status = 1" &_
"AND ( product_name LIKE '%" & searchFor & "%' " &_
"OR product_briefDesc LIKE '%" & searchFor & "%') " &_
"ORDER BY product_name"

SET RS = Con.Execute( sqlString )
IF NOT RS.EOF AND searchFor <> "" THEN
%>

Hope someone out there will give me the clue to get on ...!
Thanks a lot
Otto -
Copenhagen -Denmark


Charlene Drozd

unread,
Mar 21, 2001, 8:08:04 PM3/21/01
to
I went through the same book but my searches worked OK (other things didn't
work as well though). I *paraphrased* the same code and it works. Is it
possible that your database structure does not have exactly the same names
as the table specified or the columns (fields) within the table? I also
used a DNS-less connection and also connected to Access. I don't know if
this makes any difference.

In any event, the ecommerce site now works with some minor modifications.


Dave H

0 new messages