Example of using XDR in SQL2000 query_PHP tutorial

WBOY
Release: 2016-07-13 17:01:04
Original
814 people have browsed it

Does XDR not know? It’s just simplified XML-Data. Now demonstrate how to implement such a query
SELECT o.OrderID, o.OrderDate from Orders o, Customers c,
WHERE o.CustomerID = c.CustomerID and c.CompanyName = ?
Code:
<%@ Language=VBScript %>
<%
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:

< Customer CustomerID="TORTU" CompanyName="Tortuga Restaurante">

< ;Order CustomerID="TORTU" OrderID="10293" OrderDate="1996-08-29T00:00:00" />



www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631202.htmlTechArticleXDR doesn’t know, right? It’s just simplified XML-Data. Now demonstrate how to implement such a query SELECT o.OrderID, o.OrderDate from Orders o, Customers c, WHERE o.CustomerID = c.C...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template