2017网剧男扮女装:请问优化ASP中的ADO操作中使用存储过程?如何编码?有哪位高手可以详细指点一下?有编好的吗?

来源:百度文库 编辑:神马品牌网 时间:2024/05/09 20:10:05
请您补充完整吧~能翻译一下吗?小弟是在看不太懂

首先你的库里应该有存储过程,在ASP里使用时可将SQL语句换成存储过程名,假设它为myStoreProcedure
give an example:
<%
dim Conn,strSQL,rs
set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open "DSN=webData;uid=user;pwd=password"
strSQL="myStoreProcedure"
Set rs= Conn.Excute(strSQL)
%>

如有参数,parameter
<%
dim Conn,strSQL,rs,parameter
set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open "DSN=webData;uid=user;pwd=password"
strSQL="myStoreProcedure" & parameter
Set rs= Conn.Excute(strSQL)
%>