Command调用存储过程

asp

2008-05-13 11:02

COMM简单:
dim comm
set comm=Server.CreateObject("ADODB.Command")       '新建comm
comm.ActiveConnection=conn                                           '连接conn
comm.commandtext=" SQL "                   '命令或过程
comm.commandtype= -1 1 2 4                -1 随意 1 SQL 2表 4过程
comm.execute()                                       '执行
                       

存储过程    无参数 无返回值
     Dim Conn
     Set Conn = Server.CreateObject("ADOBD.Connection")
     objConn.Open “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
     objConn.Execute "exec sp_AddHit"