| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello anyone out there,
Okay, this is my problem. I'm designing a site with one page that links to a database to search for equipment. I recently redesigned the site, ie, changed the navigation bar and menu links underneath (No images in that one). But now when I uploaded the page, there is new error message now— "Microsoft VBScript compilation error '800a0409' Unterminated string constant /parts.asp, line 178 sql="select * from product where (Product_ID like" Here is the code that came along with it— <table> <%'insert code for display the search results%> <!--#include file=capamax/conn.asp --> <!--#include file=capamax/htmlcode.asp --> <% if len(request("itemname"))>=3 and request("eaction")="search" then if request("item")="Product_ID" then sql="select * from product where (Product_ID like '"&"%"&HTMLEncode(request("itemname"))&"%"&"' ) or (Alternate_Part_ID like '"&"%"&HTMLEncode(request("itemname"))&"%"&"' ) order by ID" end if if request("item")="Description" then sql="select * from product where Description like '"&"%"&HTMLEncode(request("itemname"))&"%"&"' order by ID" end if %> <% set rs=server.CreateObject("ADODB.RecordSet") rs.Open sql,conn,3,2 if not rs.eof then if request("page")<>"" then page=cint(request("page")) else page=1 end if if request("line")<>"" then line=cint(request("line")) else line=80 end if if page>(rs.RecordCount-1)\line+1 then response.write("设置不合理,错误!") response.end end if rs.PageSize=line rs.AbsolutePage=page %> </table> Any help would be greatly, greatly, greatly appreciated. But please keep in mind that I'm just learning ASP so please be gentle. Thanks in advance. |
|
#2
|
||||
|
||||
|
If this line is broken by carriage returns, it just needs putting back on to 1 line:
Code:
sql="select * from product where (Product_ID like
'"&"%"&HTMLEncode(request("itemname"))&"%"&"' ) or (Alternate_Part_ID like
'"&"%"&HTMLEncode(request("itemname"))&"%"&"' ) order by ID"
Code:
sql="select * from product where (Product_ID like '"&"%"&HTMLEncode(request("itemname"))&"%"&"' ) or (Alternate_Part_ID like '"&"%"&HTMLEncode(request("itemname"))&"%"&"' ) order by ID"
|
|
#3
|
|||
|
|||
|
Thanks alot for the advice, but I'm still having problems. It still says "Unterminated String Content" but with the whole line now,
" Microsoft VBScript compilation error '800a0409' Unterminated string constant /parts.asp, line 178 sql="select * from product where (Product_ID like' "&"%"&HTMLEncode(request("itemname"))&"%"&"' ) or (Alternate_Part_ID like" What do I do now? |
|
#4
|
||||
|
||||
|
The line is still not complete. Scroll to the right of my code box - there is more text...
|
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > Please HELP!! this dummy... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|