日期:2014-05-17  浏览次数:21025 次

语法错误 (操作符丢失) 在查询表达式 'Name =' 中。
<!--#include   file= "../include/DBConnection.asp "-->

<%

Dim   str,sql_

str=Request( "   Name   ")

sql_   =   "delete   From   tabPerson   where   Name   =   "   &   str

Conn.Execute   sql_

CloseConn   conn
set   upload=nothing
response.Redirect( " ")

%>     怎样改阿?

------解决方案--------------------
str=Request( "Name ")
Request后面引号内不要空格。
------解决方案--------------------
sql_ = "delete From tabPerson where Name = ' " & str& " ' "
------解决方案--------------------
是不是又是?跟name之间有空格的原因?
------解决方案--------------------
<!--#include file= "../include/DBConnection.asp "-->

<%

Dim str,sql_

str=Request( "Name ")

sql_ = "delete From tabPerson where [Name] = ' " & str & " ' "

Conn.Execute sql_

CloseConn conn
set upload=nothing
response.Redirect( " ")

%>
------解决方案--------------------
str=trim(Request( "Name "))