这是什么错啊

张三大胖 2006-08-05 04:04:35
Microsoft OLE DB Provider for SQL Server 错误 '80040e14'

在关键字 'like' 附近有语法错误。

/1/aaaa/guanli.asp,行 87

但是我在点查询的时候,就可以出结果了 就是第一次运行的时候有这个问题,谁能帮忙啊

...全文
68 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
张三大胖 2006-08-05
  • 打赏
  • 举报
回复
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="inc/conn.asp"-->
<html>
<head>

<%
del=Request("del")
if del<>"" then
SQL="Delete from t_kdaccount_gl where cacc_name="&del
conn.Execute SQL
Response.write("<script>alert('记录删除成功')</script>")
end if
%>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE>
TD {
FONT-SIZE: 9pt; LINE-HEIGHT: 140%
}
BODY {
FONT-SIZE: 9pt; LINE-HEIGHT: 140%
}
A:link {
COLOR: #0033cc; TEXT-DECORATION: none
}
A:visited {
COLOR: #0033cc; TEXT-DECORATION: none
}
A:active {
COLOR: #ff0000; TEXT-DECORATION: none
}
A:hover {
COLOR: #000000; TEXT-DECORATION: underline
}
.header {
font-family: Tahoma, Verdana; font-size: 9pt; color: #FFFFFF; background-color: #69C37C
}
.category{
font-family: Tahoma, Verdana; font-size: 9pt; color: #000000; background-color: #EFEFEF
}
.style3 {color: #FF0000}
.STYLE5 {color: #FFFFFF}
.STYLE6 {color: #333333; }
.STYLE7 {color: #000000}
</STYLE>
<title>管理</title>

</head>
<body text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0>
<form name="form1" action="guanli.asp" method="post">
<table width="800" border="1" align="center" cellpadding=1 cellspacing="0" borderColor=#996633 style="BORDER-COLLAPSE: collapse">
<tr>
<td colspan=5 align="center" bgcolor="#996633"><span class="STYLE5">查询</span></td>
</tr>
<tr>
<td width="161" align="center" bgcolor="#FFECD9"><select name="select">
<option value="cacc_name">cacc_name</option>
<option value="公司全称">公司全称</option>
<option value="联系人">联系人</option>
<option value="公司性质">公司性质</option>

</select>
</td>
<td width="172" align="center" bgcolor="#FFECD9"><input name="name" type="text" id="name"></td>
<td width="141" align="center" bgcolor="#FFECD9"><select name="select1">
<option value="公司全称">公司全称</option>
<option value="联系人">联系人</option>
<option value="公司性质">公司性质</option>
<option value="cacc_name">cacc_name</option>

</select>
</td>
<td width="194" align="center" bgcolor="#FFECD9"><input name="quancheng" type="text" id="quancheng"></td>
<td width="110" align="center" bgcolor="#FFECD9"><div align="center">
<input name="submit" type=submit class="STYLE6" value="查询" >
</div> </td>
</tr>
</table>
</form>
<div align="center">
<%
sql="select * from v_kdaccount_gl where "&Request("select")&" like '%"&trim(request.form("name"))&"%' and "&Request("select1")&" like '%"&trim(request.form("quancheng"))&"%'"
sqlcount="select count(*) from v_kdaccount_gl where "&Request("select")&" like '%"&trim(request.form("name"))&"%' and "&Request("select1")&" like '%"&trim(request.form("quancheng"))&"%'"

set rs = server.createobject("adodb.recordset")
set rscount = server.createobject("adodb.recordset")
rscount.open sqlcount,conn
rs.open sql,conn,1,1
totalput=rscount(0)
response.Write "共"&totalput&"条记录"%>
</div>
</div>
</div>
<table width="800" border="1" align="center" cellpadding=0 cellspacing="0" borderColor=#996633 style="BORDER-COLLAPSE: collapse">
<tr>
<td colspan=8 align="center" bgcolor="#996633"><span class="STYLE5">查询结果</span></td>
</tr>
<tr width="960" align="center" valign="middle">
<td width="115" align="center" bgcolor="#CCCCCC" class="STYLE6">cacc_name</td>
<td width="107" align="center" bgcolor="#CCCCCC"><span class="STYLE7">公司全称</span></td>
<td width="69" align="center" bgcolor="#CCCCCC" class="STYLE7">联系人</td>
<td width="132" align="center" bgcolor="#CCCCCC"><span class="STYLE7">联系方式</span></td>
<td width="90" align="center" bgcolor="#CCCCCC" class="STYLE7">上市代码</td>
<td width="86" align="center" bgcolor="#CCCCCC">公司代码</td>
<td width="76" align="center" bgcolor="#CCCCCC">公司性质</td>
<td width="107" align="center" bgcolor="#CCCCCC"><span class="STYLE7">管理</span></td>
</tr>
<%do while not rs.eof
%>
<tr width="960" align="center" valign="middle">
<td align="center"><a href="viewuser.asp?id=<%=rs("cacc_name")%>" target="_blank"><%=rs("cacc_name")%></a></td>
<td align="center"><%=rs("公司全称")%></td>
<td align="center"><%=rs("联系人")%></td>
<td align="center"><%=rs("联系方式")%></td>
<td align="center"><%=rs("上市代码")%></td>
<td align="center"><%=rs("公司代码")%></td>
<td align="center"><%=rs("公司性质")%></td>
<td align="center"><a href="xiugai.asp?ID=<%=rs("cacc_name")%>" target="_blank">修改</a> 
<A href="javascript:del(<%=rs("cacc_name")%>)">删除</A></td>
</tr>
<p>
<%
rs.movenext
loop

rs.close
set rs = nothing
conn.close
set conn = nothing%>
</table>

</body>
</html>
<script>
function del(id)
{
if(confirm("你真得要删除这条记录吗?"))
location.href="guanli.asp?del="+id+"&count=<%=count%>&tid=<%=tid%>";
}

</script>
mingli2006 2006-08-05
  • 打赏
  • 举报
回复
你问的问题不清不楚的,

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧