<%Set Dataconn = Server.CreateObject("ADODB.Connection") '建立连接对象 Dataconn.Open "DSN=SinoTrans;SERVER=APP_SERVER;UID=sa;PWD=;APP=Microsoft (R) Developer Studio;WSID=APP_SERVER;Regional=Yes" Set cmdTemp = Server.CreateObject("ADODB.Command") '建立命令对象 Set rst= Server.CreateObject("ADODB.Recordset") '建立记录集对象 cmdTemp.CommandText = "Customers " cmdTemp.CommandType = 2 Set cmdTemp.ActiveConnection = DataConn rst.Open cmdTemp, , 1, 3 '生成查询结果%> |
<%Set Dataconn = Server.CreateObject("ADODB.Connection") '建立连接对象Dataconn.Open "DSN=SinoTrans;SERVER=APP_SERVER;UID=sa;PWD=;APP=Microsoft (R) Developer Studio;WSID=APP_SERVER;Regional=Yes"Set cmdTemp = Server.CreateObject("ADODB.Command") '建立命令对象Set rst = Server.CreateObject("ADODB.Recordset") '建立记录集对象cmdTemp.CommandText = "dbo.pd_test" '存储过程名称cmdTemp.CommandType = 4 '命令类别为4,表示为存储过程Set cmdTemp.ActiveConnection = DataconnSet tmpParam = cmdTemp.CreateParameter("Return Value", 3, 4, 4)cmdTemp.Parameters.Append tmpParamSet tmpParam = cmdTemp.CreateParameter("@BeginDate", 135, 1, 16, riqi) '创建输入参数对象cmdTemp.Parameters.Append tmpParamrst.Open cmdTemp, , 1, 3 '生成查询结果%> |
<%Set Dataconn = Server.CreateObject("ADODB.Connection") '建立连接对象Dataconn.Open "DSN=SinoTrans;SERVER=APP_SERVER;UID=sa;PWD=;APP=Microsoft (R) Developer Studio;WSID=APP_SERVER;Regional=Yes"ss = "EXECUTE dbo.pd_test " & "'" & riqi1 & "'" Set rs = dataconn.Execute(ss)%> |
欢迎光临 黑色海岸线论坛 (http://bbs.thysea.com/) | Powered by Discuz! 7.2 |