日期:2014-05-16  浏览次数:20882 次

ASP连接ACCESS数据的问题在运行时出的错
这是我出现的错误:


  M[color=#FF0000]icrosoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] 语法错误 (操作符丢失) 在查询表达式 'NVC_LADINGBILL = '2' AND INT_ID <>' 中。
/try1/manage/exportedit.asp, 第 155 行[/color]
 
  原码
 
'查找提单号是否存在
if NVC_LADINGBILL <> "" then
strSql = ""
strSql = strSql & " SELECT "
strSql = strSql & " NVC_LADINGBILL "
strSql = strSql & " FROM "
strSql = strSql & GLOBAL_DB_EXPORT
strSql = strSql & " WHERE "
strSql = strSql & " NVC_LADINGBILL = '"& NVC_LADINGBILL &"' "
strSql = strSql & " AND "
strSql = strSql & " INT_ID <> "& INT_ID &" "
set strRs = Server.CreateObject ("ADODB.RECORDSET")
strRs.Open strSql,conn,1,3
if not strRs.eof then



向高手请教!!!!!!!!!!!!!!


------解决方案--------------------
if NVC_LADINGBILL <> "" then
strSql = ""
strSql = strSql & " SELECT "
strSql = strSql & " NVC_LADINGBILL "
strSql = strSql & " FROM "
strSql = strSql & GLOBAL_DB_EXPORT
strSql = strSql & " WHERE "
strSql = strSql & " NVC_LADINGBILL = '"& NVC_LADINGBILL &"' "
strSql = strSql & " AND "
strSql = strSql & " INT_ID <> "& INT_ID &" "

response.write strSql
response.write end
set strRs = Server.CreateObject ("ADODB.RECORDSET")
strRs.Open strSql,conn,1,3
if not strRs.eof then


然后贴出你的strSql的内容是什么。
------解决方案--------------------
你将strSql内容显示出来看看