小鎮(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 :: 首頁 :: 聯系 :: 聚合  :: 管理
            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 閱讀(249) 評論(0)  編輯  收藏 所屬分類: Web(asp, javascript, css ...)
          主站蜘蛛池模板: 永康市| 井研县| 甘南县| 台江县| 宁化县| 洛南县| 栖霞市| 定南县| 重庆市| 连南| 海安县| 沁阳市| 双峰县| 边坝县| 衡东县| 虞城县| 长泰县| 肥乡县| 澄城县| 吉安县| 容城县| 孝感市| 大庆市| 都兰县| 龙游县| 两当县| 镇平县| 武胜县| 承德市| 济宁市| 聂荣县| 沙田区| 汽车| 安吉县| 铜梁县| 麻城市| 宁明县| 鄱阳县| 徐汇区| 朝阳县| 五原县|