有关execute 的Expected identifier错误

long405405 2009-10-21 03:34:06
本人刚接触VBscript,在执行一下代码出现Expected identifier错误。

set aRS_str = createObject("ADODB.Recordset")

aSQL_str = " select * from strings_multi_language where variable is not null and variable <> ''"

aRS_str.open aSQL_str, aConn, 1, 1, 1
Dim strVariable
Dim strValue
while not aRS_str.eof
strVariable = aRS_str("variable")
strValue = aRS_str(aLang)
execute strVariable& "= strValue"
aRS_str.movenext
'response.Write(strVariable&"="&strValue&"<br>")
wend
aRS_str.close

set aRS_str = nothing


去掉execute strVariable& "= strValue"没有错误,这一句的写法有什么问题吗?
response.Write(strVariable&"="&strValue&"<br>")输出正常,
感谢帮忙
...全文
212 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Dogfish 2009-10-22
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 long405405 的回复:]
字段variable中部分数据有问题(以"."结尾),程序正确!
[/Quote]
有点肯定不行的。把和变量命名冲突的字符去掉才行。
Dogfish 2009-10-22
  • 打赏
  • 举报
回复
aSQL_str = " select * from strings_multi_language where variable is not null and variable <> ''"
long405405 2009-10-21
  • 打赏
  • 举报
回复
字段variable中部分数据有问题(以"."结尾),程序正确!

4,007

社区成员

发帖
与我相关
我的任务
社区描述
它是一种微软环境下的轻量级的解释型语言,它使用COM组件、WMI、WSH、ADSI访问系统中的元素,对系统进行管理。
社区管理员
  • vbScript社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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