小镇树妖--住在树上的妖

To follow the path: look to the master, follow the master, walk with the master, see through the master, become the master.

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  10 Posts :: 50 Stories :: 7 Comments :: 0 Trackbacks

'建一个command对象
set comm = server.CreateObject ("adodb.command")
'建立连接
comm.ActiveConnection = conn
'设置command调用类型是存储过程 (adCmdSPStoredProc = 4)
comm.CommandType = 4
'定义command 对象调用名称
comm.CommandText = "P_advkind"
'定义输入参数
set CommPa1 = comm.CreateParameter ("参数1" , adVarChar , adParamInput , 10 , "参数1")
set CommPa2 = comm.CreateParameter ("参数2" , VarChar ,adParamInput ,20 , 参数2)
set CommPa3 = comm.CreateParameter ("参数3" ,varChar ,adParamInput ,100 , 参数3)
set CommPa4 = comm.CreateParameter ("参数4" ,vrChar ,adParamInput ,1000 , 参数4)

AddPadd 4

'运行存储过程
comm.Execute

'清空对象
Set comm.ActiveConnection = nothing
Set comm = nothing

Response.Redirect "/success.asp?zho="&server.URLEncode ("添加成功!")

CloseDB

sub AddPadd(num)
 dim i
 for i=1 to num
  execute "comm.Parameters.Append CommPa"&i
    next
end sub
%>

posted on 2006-09-02 20:13 jacky wu 阅读(246) 评论(0)  编辑  收藏 所属分类: Web(asp, javascript, css ...)

只有注册用户登录后才能发表评论。


网站导航: