如何查询出SQL语句?

exten 2004-01-06 11:45:38
如何查询出SQL语句?
我在执行下列语句时,经常出错,原因是v_where定义错误。但现在想查询出具体的SQL语句,以便能够更改v_where语句。怎么查??
Set RsBrowse = conn.execute("SELECT * FROM dbo.eos_prepare where "&v_where&" order by prepare_no")
...全文
40 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
jfly301 2004-01-06
  • 打赏
  • 举报
回复
应该是楼上说的那样,如果你要看v_where
就是,
response.write v_where
response.end()
61 2004-01-06
  • 打赏
  • 举报
回复
on error resume next
Set RsBrowse = conn.execute("SELECT * FROM dbo.eos_prepare where "&v_where&" order by prepare_no")
response.write err.description
response.end
xing0091 2004-01-06
  • 打赏
  • 举报
回复
同意楼上
最好在Response.Write strsql后面加上response.end
如果有错误可以中断掉
jacklinchen 2004-01-06
  • 打赏
  • 举报
回复
Set RsBrowse = Server.CreateObject("ADODB.Recordset")
strsql=SELECT * FROM dbo.eos_prepare where "&v_where&" order by prepare_no"
Response.Write strsql ''查看SQL语句
RsBrowse.open strsql,conn,1,1 ''运行

28,408

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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