小鎮(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 ...)
          主站蜘蛛池模板: 西充县| 孝感市| 盐池县| 昌图县| 皮山县| 嘉祥县| 东乌| 北碚区| 缙云县| 鄂州市| 阿瓦提县| 淮阳县| 兴业县| 九龙县| 乃东县| 拉萨市| 隆尧县| 金塔县| 个旧市| 蓬溪县| 长葛市| 乐清市| 汽车| 靖边县| 西平县| 静乐县| 张掖市| 丽江市| 五常市| 红河县| 桦川县| 永川市| 辉南县| 米林县| 上犹县| 榕江县| 玛纳斯县| 东海县| 宣恩县| 耿马| 阿巴嘎旗|