Thank you for the answer. But, I got this theoretical information already on
myself. So, I have just no idea to execute it to this example:
Imports System.Web
Imports System.Xml
Imports System.Xml.Xsl
Imports System.Data
Imports System.Data.Sql Client
Public Class MakeData
Implements IHttpHandler
Public ReadOnly Property IsReusable() As Boolean _
Implements IHttpHandler.Is Reusable
Get
Return False
End Get
End Property
Public Sub ProcessRequest( ByVal context As HttpContext) _
Implements IHttpHandler.Pr ocessRequest
Dim sConn As String = "User ID=sa;Password= ;Initial
Catalog=Northwi nd;Data Source=ibf-server;"
Dim sSQL As String = _
"SELECT LastName, Sum([UnitPrice]*[Quantity]*(1-[Discount])) AS
OrderTotal " & _
"FROM Employees INNER JOIN (Orders INNER JOIN [Order Details] ON
" & _
"Orders.Ord erID = [Order Details].OrderID) ON
Employees.Emplo yeeID = " & _
"Orders.Employe eID GROUP BY LastName"
'Connect to the data source.
Dim nwindConn As SqlConnection = New SqlConnection(s Conn)
nwindConn.Open( )
'Build a dataSet for Employee Sales.
Dim ds As DataSet
ds = New DataSet("MyData set")
Dim da As SqlDataAdapter = New SqlDataAdapter( sSQL, nwindConn)
da.Fill(ds)
'Transform the dataSet using the stylesheet.
Dim xmlDoc_ds As XmlDataDocument = New XmlDataDocument (ds)
Dim xslTran As XslTransform = New XslTransform
xslTran.Load(co ntext.Server.Ma pPath("Rowset.x slt"))
'Return the persisted recordset.
context.Respons e.ContentType = "text/xml"
context.Respons e.Charset = ""
xslTran.Transfo rm(xmlDoc_ds, Nothing, context.Respons e.Output)
End Sub
End Class
"Oleg Tkachenko [MVP]" wrote:
Rouven Hertenstein wrote:
I'm trying to test the vb.net-exercise "How to use a DataSet with the Office
XP Chart Component and ASP.NET" on
http://support.microsoft.com/kb/303016/en-us
Visual Studio rails against the expression:
"xslTran.Transf orm(xmlDoc_ds, Nothing, context.Respons e.Output)"
and comments:
"Public Sub Transform(input As System.Xml.XPat h.IXPathNavigab le, args As
System.Xml.Xsl. XsltArgumentLis t, output As System.IO.TextW riter)" is
obsolete: "you should pass XmlResolver to Transform() method"
Sorry, but that's an untasted field for me. Please tell me, what to do.
Those are .NET 1.1 chages. Pass new XmlUrlResolver( ) as a fourth argument.
--
Oleg Tkachenko [XML MVP, MCAD]
http://blog.tkachenko.com