Chinaunix首页 | 论坛 | 博客
  • 博客访问: 376091
  • 博文数量: 1051
  • 博客积分: 53280
  • 博客等级: 大将
  • 技术积分: 6670
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-09 13:21
文章分类

全部博文(1051)

文章存档

2011年(1)

2008年(1050)

我的朋友

分类:

2008-09-09 15:43:55


  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:\INETPUB\WWWROOT\PBA\"
  
    adoCmd.Properties("Output Stream") = Response
  
    Response.write ""
  
    adoCmd.Execute , , 1024 'adExecuteStream
  
    Response.write "
"
  
  %>
  
  Result:
  
  
  
  
  
   
  
   
  
   
  
   
  
   
  
   
  
   
  
   
  
   
  
   
  
  

  
  
 
  
  Orders.xml
  
  
  
    
  xmlns:sql="urn:schemas-microsoft-com:xml-sql">
  
   
  
    
  
    
  
    
  
    
  
    
  
    
  
   

  
   
  
    
  
    
  
    
  
    
  
    
  
       
  relation="Orders" />
  
    

  
   

  
  
【责编:admin】

--------------------next---------------------

阅读(194) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~