当前位置: 代码迷 >> ASP >> :Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)Microsoft][ODBC SQL Server Driver][SQL Server]第 1 行: '*' 附近有语
  详细解决方案

:Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)Microsoft][ODBC SQL Server Driver][SQL Server]第 1 行: '*' 附近有语

热度:670   发布时间:2012-03-07 09:13:51.0
求助:Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)Microsoft][ODBC SQL Server Driver][SQL Server]第 1 行: '*' 附近有语
错误类型:
Microsoft   OLE   DB   Provider   for   ODBC   Drivers   (0x80040E14)
[Microsoft][ODBC   SQL   Server   Driver][SQL   Server]第   1   行:   '* '   附近有语法错误。
/1/2002716114847_75960/公司通讯录/Jaddress1.0/addrdel.asp,   第   14   行
程序如下:

<!--#include   file= "db.asp "-->
<!--#include   file= "session.asp "-->
<%sort=request.Form( "sort ")
id=request.Form( "id ")
if   sort= "comp "   then
strSql   =   "delete   *   from   cp   where   id= "&   id
conn.Execute   strSql
strSql   =   "delete   *   from   address   where   cmp= ' "&   id
conn.Execute   strSql
conn.Close
      response.redirect   "listcomp.asp "
else
strSql   =   "delete   *   from   address   where   id= "&   id
conn.Execute   strSql     <--------出错行
conn.Close
      response.redirect   "listmember.asp "
      end   if%>

看了很久,不知什么地方错了,请高手指教,谢谢!


------解决方案--------------------
strSql = "delete * from address where id= "& id
conn.Execute strSql <--------出错行
去掉*就可以了
strSql = "delete from address where id= "& id
conn.Execute strSql <--------出错行

楼主应该跟我一样也是初学的吧,以后遇到这样的问题不要盯着这一行看,看看跟这个有关的东西的语法,祝你好运,如果交流可以加我QQ43996741
  相关解决方案