正在加载图片...
電子工業出版社 JSHING HOUSE DF ELECTRONCS INDSTE <?xml version="1. 0 encoding="utf-8 ? <ROOT> <Orders Order ID=10289 OrderDate= 1996-08-26T00: 00: 00"/> </Customers> </ROOT> 【例149】通过HITP执行存储过程 首先在目标数据库创建存储过程,名为 test sp, create procedure test s SELECT Customers. Customer ld, Orders. Order id, Orders. OrderDate FROM Customers. Orders WHERE Customers. Customer ID= Orders. CustomerID and Customers. country= UK FOR XML AUTO 【例14.10】使用模板访问数据库 模板代码: Kroot xmIns: sql=urn: schemas-microsoft-com: xmI-sql'> SELECT Customers. Customer ID, Orders. Order ID, Orders, OrderDate FROM Customers Orders WHERE Customers. Customer ID= Orders. CustomerID and Customers. country= UK for xml auto<?xml version="1.0" encoding="utf-8" ?> - <ROOT> - <Customers CustomerID="BSBEV"> <Orders OrderID="10289" OrderDate="1996-08-26T00:00:00" /> </Customers> ....... </ROOT> 【例 14.9】通过 HTTP 执行存储过程 首先在目标数据库创建存储过程, 名为 test_sp, create procedure test_sp as SELECT Customers.CustomerID, Orders.OrderID, Orders.OrderDate FROM Customers, Orders WHERE Customers.CustomerID = Orders.CustomerID and Customers.country='UK' FOR XML AUTO 【例 14.10】使用模板访问数据库 模板代码: <root xmlns:sql='urn:schemas-microsoft-com:xml-sql'> <sql:query> SELECT Customers.CustomerID, Orders.OrderID, Orders.OrderDate FROM Customers, Orders WHERE Customers.CustomerID = Orders.CustomerID and Customers.country='UK' for xml auto </sql:query> </root>
<<向上翻页
©2008-现在 cucdc.com 高等教育资讯网 版权所有