为什么总是提示未结束的字符串常量

来源:百度知道 编辑:UC知道 时间:2024/06/30 22:47:38
ASP中 提示该句出错:strsql="select 编号 as ID,书名 as name,作者 as author,出版社 as publish,售价 as price from book where 书名 like '%网络%' and 售价 between 30 and 40 order by
售价 DESC"
出错原因:未结束的字符串常量
改成: strsql="select 编号 as ID,书名 as name,作者 as author,出版社 as publish,售价 as price from book where 书名 like '%网络%' and 售价 between 30 and 40
即把order语句去掉就没有错
请教高手这是什么原因,多谢,在线等。

strsql="select 编号 as ID,书名 as name,作者 as author,出版社 as publish,售价 as price from book where 书名 like '%网络%' and (售价 between 30 and 40) order by [售价] DESC"

你加
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>没?
有可能你是在测试专门的这个页面的时候,而该页面没有这个东东。会出错,我有过类似的经历。---你把ORDER去掉之后再来测试,都弄两次还会错。

另外。也有可能是语句问题
你把like那里改成
....like'%"&"网络"&"%'....
看看行不。

应该是JS错误吧