set conn = server.createobject("adodb.connection") conn.mode=admodereadwrite conn.open application("connectionstring") set cm.activeconnection=conn ' 返回数据 if not returnsdata then cm.execute else set r = server.createobject("adodb.recordset") r.cursorlocation = aduseclient r.open cm, ,adopenstatic, adlockreadonly end if
if returnsdata then r.save response, adpersistxml if err.number <> 0 then call responseerror ("数据集发生存储错误" & "在命令'" & commandtext & "': " & err.description) response.end end if
create procedure recentpurchasebycustomerid @customerid nchar(5), @productname nchar(40) output as select @productname = (select top 1 productname from products inner join ([order details] inner join orders on orders.orderid=[order details].orderid) on products.productid = [order details].productid where orders.orderdate = (select max(orders.orderdate) from orders where [email protected]) and [email protected]) go
dim s s = "<?xml version=""1.0 ,欢迎访问网页设计爱好者web开发。|||""?>" & vbcrlf s = s & "<command><commandtext>" s = s & "custorderhist" s = s & "</commandtext>" s = s & "<returnsdata>" &true</returnsdata>" s = s & "<param>" s = s & "<name>customerid</name>" s = s & "<type><%=advarchar%></type>" s = s & "<direction>" & <%=adparaminput%></direction>" s = s & "<size>" & len(customerid)& "</size>" s = s & "<value>" & customerid &"</value>" s = s & "</param>" s = s & "</command>"