在SQL2000查询中使用XDR的例子_PHP教程

WBOY
发布: 2016-07-13 17:01:04
原创
817 人浏览过

XDR不会不知道吧?就是简化的XML-Data啦。现在示范一个如何实现这样的查询
SELECT o.OrderID, o.OrderDate from Orders o, Customers c,
WHERE o.CustomerID = c.CustomerID and c.CompanyName = ?
Code:

Dim sConn
sConn = "Provider=SQLOLEDB; Data Source=(local); Initial Catalog=Northwind; User ID=SA;Password=;"

Dim adoConn
Set adoConn = Server.CreateObject("ADODB.Connection")
adoConn.ConnectionString = sConn
adoConn.CursorLocation = 3 'adUseClient
adoConn.Open

Dim adoCmd
Set adoCmd = CreateObject("ADODB.Command")
Set adoCmd.ActiveConnection = adoConn
adoCmd.CommandText = "Customer[@CompanyName=""Tortuga Restaurante""]"
adoCmd.Dialect = "{ec2a4293-e898-11d2-b1b7-00c04f680c56}"

adoCmd.Properties("Mapping Schema") = "Orders.xml"
adoCmd.Properties("Base Path") = "C:INETPUBWWWROOTPBA"
adoCmd.Properties("Output Stream") = Response

Response.write ""
adoCmd.Execute , , 1024 'adExecuteStream
Response.write "
"
%>
Result:







www.bkjia.comtruehttp://www.bkjia.com/PHPjc/631202.htmlTechArticleXDR不会不知道吧?就是简化的XML-Data啦。现在示范一个如何实现这样的查询 SELECT o.OrderID, o.OrderDate from Orders o, Customers c, WHERE o.CustomerID = c.C...
相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板