小鎮(zhèn)樹妖--住在樹上的妖

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

            BlogJava :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
            10 Posts :: 50 Stories :: 7 Comments :: 0 Trackbacks

          '建一個command對象
          set comm = server.CreateObject ("adodb.command")
          '建立連接
          comm.ActiveConnection = conn
          '設(shè)置command調(diào)用類型是存儲過程 (adCmdSPStoredProc = 4)
          comm.CommandType = 4
          '定義command 對象調(diào)用名稱
          comm.CommandText = "P_advkind"
          '定義輸入?yún)?shù)
          set CommPa1 = comm.CreateParameter ("參數(shù)1" , adVarChar , adParamInput , 10 , "參數(shù)1")
          set CommPa2 = comm.CreateParameter ("參數(shù)2" , VarChar ,adParamInput ,20 , 參數(shù)2)
          set CommPa3 = comm.CreateParameter ("參數(shù)3" ,varChar ,adParamInput ,100 , 參數(shù)3)
          set CommPa4 = comm.CreateParameter ("參數(shù)4" ,vrChar ,adParamInput ,1000 , 參數(shù)4)

          AddPadd 4

          '運(yùn)行存儲過程
          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 閱讀(251) 評論(0)  編輯  收藏 所屬分類: Web(asp, javascript, css ...)
          主站蜘蛛池模板: 都江堰市| 昌黎县| 桐梓县| 开平市| 渭源县| 秭归县| 三穗县| 宁德市| 钟山县| 普兰县| 拜城县| 曲麻莱县| 平定县| 南城县| 广丰县| 灌云县| 镇江市| 白银市| 伽师县| 仁化县| 衢州市| 银川市| 全南县| 唐山市| 临沂市| 藁城市| 潜江市| 柏乡县| 项城市| 五原县| 寿宁县| 丁青县| 禄劝| 天台县| 通许县| 浦县| 阳春市| 息烽县| 云浮市| 江陵县| 乳山市|