(OWC) y ASP.NET - Willy .Net
(OWC) y ASP.NET - Willy .Net
(OWC) y ASP.NET - Willy .Net
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
24. Dim sConn As String = "User<br />
ID=;Password=;Initial Catalog=Northwind;Data<br />
Source=YourSQLServer;"<br />
25. Dim sSQL As String = _<br />
26. "SELECT LastName, Sum([UnitPrice]*[Quantity]*(1-[Discount])) AS<br />
OrderTotal " & _<br />
27. "FROM Employees INNER JOIN (Orders INNER JOIN [Order<br />
Details] ON " & _<br />
28. "Orders.OrderID = [Order Details].OrderID) ON<br />
Employees.EmployeeID = " & _<br />
29. "Orders.EmployeeID GROUP BY LastName"<br />
30.<br />
31. 'Connect to the data source.<br />
32. Dim nwindConn As SqlConnection = New SqlConnection(sConn)<br />
33. nwindConn.Open()<br />
34.<br />
35. 'Build a dataSet for Employee Sales.<br />
36. Dim ds As DataSet<br />
37. ds = New DataSet("MyDataset")<br />
38. Dim da As SqlDataAdapter = New SqlDataAdapter(sSQL, nwindConn)<br />
39. da.Fill(ds)<br />
40.<br />
41. 'Transform the dataSet using the stylesheet.<br />
42. Dim xmlDoc_ds As XmlDataDocument = New XmlDataDocument(ds)<br />
43. Dim xslTran As XslTransform = New XslTransform()<br />
44. xslTran.Load(context.Server.MapPath("Rowset.xslt"))<br />
45.<br />
46. 'Return the persisted recordset.<br />
47. context.Response.ContentType = "text/xml"<br />
48. context.Response.Charset = ""