这个怎么做(运行输出的 ASP 语句)?在线等!

yuwenwu_xhs 2006-05-10 06:28:03
比如我把一条 SQL 语句写在数据库的某个字段中。

现在我想读出该字段中的ASP语句并运行。请问怎么做?

实例说明: 如 字段中的内容为 <%disp()%> (字段内容就是一个 asp 函数)

我想在读取出该字段的值后马上执行 disp() 函数,请问怎样做?
...全文
115 7 打赏 收藏 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
ruide205 2006-05-11
  • 打赏
  • 举报
回复
<%
Function getOrder(Ddate)
'订单号
getOrder = RIGHT("0000"+Trim(Year(dDate)),4)+RIGHT("00"+Trim(Month(dDate)),2)+RIGHT("00"+Trim(Day(dDate)),2)+RIGHT("00" + Trim(Hour(dDate)),2)+RIGHT("00"+Trim(Minute(dDate)),2)+RIGHT("00"+Trim(Second(dDate)),2)
response.write getOrder
End Function

Function getdate(Ddate,Vformat)
'Oracle时间标准格式字符串
if vformat = "Oracle" then
GetDate = RIGHT("0000"+Trim(Year(dDate)),4)+RIGHT("00"+Trim(Month(dDate)),2)+RIGHT("00"+Trim(Day(dDate)),2)+" "+RIGHT("00" + Trim(Hour(dDate)),2)+":"+RIGHT("00"+Trim(Minute(dDate)),2)+":"+RIGHT("00"+Trim(Second(dDate)),2)
end if
response.write GetDate
End Function

eval("getOrder(now)")
Response.Write ("<table><tr><td style = ""height:1px;Width:500;background-color:red""></td></tr></table>")
Execute ("getdate now,"&chr(34)&"Oracle"&chr(34)&"") '也可行
%>
yuwenwu_xhs 2006-05-11
  • 打赏
  • 举报
回复
execute 倒可以起些作用
希望提供详细的调试成功的例子
yuwenwu_xhs 2006-05-11
  • 打赏
  • 举报
回复
不行啊
有没有完整点的例子
xuStanly 2006-05-10
  • 打赏
  • 举报
回复
eval("dis()")
wanghui0380 2006-05-10
  • 打赏
  • 举报
回复
<%
a="Response.write ""test"""
execute a
%>
ruide205 2006-05-10
  • 打赏
  • 举报
回复
取出来的是字符串!不能call
jobs002 2006-05-10
  • 打赏
  • 举报
回复
<%=dis%>
<% call dis%>
看看可以吗.....

28,402

社区成员

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

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