关于SELECT 子句中包含一个保留字、拼写错误或丢失的参数,或标点符号不正确!

efshou 2013-05-24 10:06:26
Microsoft JET Database Engine 错误 '80040e14'

SELECT 子句中包含一个保留字、拼写错误或丢失的参数,或标点符号不正确。

/app_manage.asp,行 80



<%
Function App_QingLing_Man'AEDKX
Conn.Execute("Update [member] Set FatherID=0,FatherName=0,pLevel=0,pPath=null,ispay=0,AgentCash=0,glf=0,jingli=0 where id>1 ")
Conn.Execute("Update [member] Set xxx2=0,xxx3=0,cc=0,sanci=0,yf=0,opp=0,xx2=0,xx3=0,bb=0,hlj=0,b_pPath=null")
conn.Execute("Delete From [history]")
conn.Execute("Delete From ZHUANJ")
conn.Execute("Delete From CHONGZHI")
conn.Execute("Delete From TIQU")
conn.Execute("Delete From Gee_Time")
conn.Execute("Delete From Gee_Bonus")
End Function

Function App_New_Man'AEDKX
App_DuTime=date()
App_FTime1="2009-3-1 23:59:59"
if conn.execute("select count(0) from [Gee_Time] ")(0)=0 then
conn.Execute("Insert Into [Gee_Time] (ShangQi,benqi,isCountB) Values ('"&App_DuTime&"','"&App_FTime1&"',1)")
end if
App_FTime=conn.execute("select top 1 ShangQi from [Gee_Time] order by id desc ")(0)
if isnull(App_FTime) then App_FTime="2009-3-1 23:59:59"
if not isdate(App_FTime) then App_FTime="2009-3-1 23:59:59"
App_DeTime=DateDiff("d",App_FTime,App_DuTime)
if App_DeTime>=1 then
conn.Execute("Insert Into [Gee_Time] (ShangQi,benqi,isCountB) Values ('"&App_DuTime&"','"&App_FTime&"',1)")
End If

App_FTime_G=conn.execute("select JDT2 from [Gee_Fee] ")(0)
if isnull(App_FTime_G) then App_FTime_G="2009-3-1 23:59:59"
if not isdate(App_FTime_G) then App_FTime_G="2009-3-1 23:59:59"
App_DeTime_H=DateDiff("d",App_FTime,App_FTime_G)
Ap_DeTime_S1=App_Feric(10914)
if App_DeTime>=int(Ap_DeTime_S1) then
Conn.Execute("Update [member] Set zls=0,lsj=0 ")
conn.Execute("Update [Gee_Fee] Set JDT2='"&App_FTime&"'")
End If
End Function

Function App_Feric(Ap_DeID)
if not isnumeric(Ap_DeID) then
App_Feric="0"
end if
if conn.execute("select count(0) from [Ap_Manage] where Ap_Class="&Ap_DeID&"")(0)>0 then
Ap_Type=conn.execute("select Ap_Type from [Ap_Manage] where Ap_Class="&Ap_DeID&" order by id desc")(0)
if Ap_Type=0 then
Ap_Num=conn.execute("select Ap_Men from [Ap_Manage] where Ap_Class="&Ap_DeID&" order by id desc")(0)
else
Ap_Num=conn.execute("select Ap_Mon from [Ap_Manage] where Ap_Class="&Ap_DeID&" order by id desc")(0)
end if
end if
if isnull(Ap_Num) then
App_Feric="0"
end if
App_Feric=Ap_Num
End Function

Function Ap_XinYun_Jexks(UID)
Ap_FangAn_A1=10210
Ap_FangAn_G1=App_Feric(Ap_FangAn_A1)
Ap_FangAn_G1=int(Ap_FangAn_G1)
if Ap_FangAn_G1=0 then Ap_XinYun_Jexks2 UID
if Ap_FangAn_G1=1 then Ap_XinYun_Jexks1 UID
End Function


Function Ap_XinYun_Jexks1(UID)
ppath=conn.execute("select ppath from member where id="&UID)(0)
repath=conn.execute("select repath from member where id="&UID)(0)
Ap_A1=10202
Ap_A2=10203
Ap_A3=10204
Ap_XinYun_G1=App_Feric(Ap_A1)
Ap_XinYun_G2=App_Feric(Ap_A2)
Ap_XinYun_G3=App_Feric(Ap_A3)
if not isnull(Ap_XinYun_G1) and not isnull(Ap_XinYun_G2) and not isnull(Ap_XinYun_G3) then
if repath<>"" then repath=left(repath,len(repath)-1)
if repath<>"" then repath=right(repath,len(repath)-1)
if repath<>"" then
SQLc="select top "&Ap_XinYun_G2&" pPath,id from member where id in ("&repath&") order by relevel desc"
set rsc=server.CreateObject("adodb.recordset")
rsc.open SQLc,conn,1,1
while not rsc.eof
Ap_XinYun_repath1=rsc("pPath")
if Ap_XinYun_repath1<>"" then Ap_XinYun_repath1=left(Ap_XinYun_repath1,len(Ap_XinYun_repath1)-1)
if Ap_XinYun_repath1<>"" then Ap_XinYun_repath1=right(Ap_XinYun_repath1,len(Ap_XinYun_repath1)-1)
if Ap_XinYun_repath1<>"" then
Ap_SQLc="select top "&Ap_XinYun_G1&" B_pPath,id from member where id in ("&Ap_XinYun_repath1&") order by plevel desc"
set Ap_rsc=server.CreateObject("adodb.recordset")
Ap_rsc.open Ap_SQLc,conn,1,1
while not Ap_rsc.eof
if conn.execute("select count(0) from member where B_pPath like '%,"&Uid&",%' and id="&Ap_rsc("id")&"")(0)=0 then
Ap_XinYun_pPath1=Replace(Replace(","&Ap_rsc("B_pPath")&",",",,",",")&Uid&",",",,",",")
conn.execute("update member set b3=b3+"&Ap_XinYun_G3&",b0=b0+"&Ap_XinYun_G3&",xx2=xx2+"&Ap_XinYun_G3&",B_pPath='"&Ap_XinYun_pPath1&"' where id="&Ap_rsc("id")&" and xx2<xx3")
end if
Ap_rsc.movenext
wend
Ap_rsc=close
set Ap_rsc=nothing
end if
rsc.movenext
wend
rsc=close
set rsc=nothing
end if
if ppath<>"" then ppath=left(ppath,len(ppath)-1)
if ppath<>"" then ppath=right(ppath,len(ppath)-1)
if ppath<>"" then
SQLc="select top "&Ap_XinYun_G1&" B_pPath,id from member where id in ("&ppath&") order by plevel desc"
set rsc=server.CreateObject("adodb.recordset")
rsc.open SQLc,conn,1,1
...全文
303 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
md5e 2013-05-24
  • 打赏
  • 举报
回复
SQLc="select top "&Ap_XinYun_G2&" [pPath],[id] from [member] where id in ("&repath&") order by [relevel] desc" 这样试试
efshou 2013-05-24
  • 打赏
  • 举报
回复
引用 2 楼 liuchaolin 的回复:
SQLc="select top "&Ap_XinYun_G2&" pPath,id from member where id in ("&repath&") order by relevel desc" 要把SQLc打印出来看看了 Response.write SQLc
select top 0 pPath,id from member where id in (1) order by relevel desc
q107770540 2013-05-24
  • 打赏
  • 举报
回复
最简单也是最常规的做法就是 DEBUG 在执行SQL前,得到完整的SQL语句 查看语法错误
efshou 2013-05-24
  • 打赏
  • 举报
回复
引用 1 楼 q107770540 的回复:
SQLc="select top "&Ap_XinYun_G2&" pPath,id from member where id in ("&repath&") order by relevel desc" ========= SQLc="select top "&Ap_XinYun_G2&" ,pPath,id from member where id in ("&repath&") order by relevel desc"
一样的提示呢。亲
md5e 2013-05-24
  • 打赏
  • 举报
回复
SQLc="select top "&Ap_XinYun_G2&" pPath,id from member where id in ("&repath&") order by relevel desc" 要把SQLc打印出来看看了 Response.write SQLc
q107770540 2013-05-24
  • 打赏
  • 举报
回复
SQLc="select top "&Ap_XinYun_G2&" pPath,id from member where id in ("&repath&") order by relevel desc" ========= SQLc="select top "&Ap_XinYun_G2&" ,pPath,id from member where id in ("&repath&") order by relevel desc"

62,266

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

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