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""?>" & 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>"