Hi all,
I am trying to produce an XML to a web service from the result of an sql query..I am very close with below but when I run the asp.net page I get a blank page.
Can someone help me.
Do I need to use a dataset?
Query does return data in sql.
I want the final result to produce htt:\\localhost\file.xml
Thx..Ray..
Code below
Dim sConnection As String = ("****MyConnectionString****")
Dim mySqlConnection As SqlConnection = New SqlConnection(sConnection)
mySqlConnection.Open()
Dim command As New SqlCommand("select * from ***MyTable*** FOR XML AUTO ,root('root')", mySqlConnection)
Dim reader As System.Xml.XmlReader = command.ExecuteXmlReader
Dim xml As New XmlDataDocument()
Xml.Load(reader)
I am trying to produce an XML to a web service from the result of an sql query..I am very close with below but when I run the asp.net page I get a blank page.
Can someone help me.
Do I need to use a dataset?
Query does return data in sql.
I want the final result to produce htt:\\localhost\file.xml
Thx..Ray..
Code below
Dim sConnection As String = ("****MyConnectionString****")
Dim mySqlConnection As SqlConnection = New SqlConnection(sConnection)
mySqlConnection.Open()
Dim command As New SqlCommand("select * from ***MyTable*** FOR XML AUTO ,root('root')", mySqlConnection)
Dim reader As System.Xml.XmlReader = command.ExecuteXmlReader
Dim xml As New XmlDataDocument()
Xml.Load(reader)