Example of using XDR in SQL2000 query. XDR doesn't know, right? It is simplified XML-Data. Now we will demonstrate how to implement such a query: SELECTo. OrderID, o. OrderDatefromOrderso, Customersc, WHEREo. CustomerIDc. c xdr? It is simplified XML-Data. Now we will 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 connected ante" "]"
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:
Why? It is simplified XML-Data. Now we will demonstrate how to implement such a query: SELECT o. OrderID, o. OrderDate from Orders o, Customers c, WHERE o. CustomerID = c. C...