angelbangkok
New Member
I'm new in .NET programming and Visual Basic and I have no much idea about it.I have the next code:\[code\]Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim cnn As New SqlConnection("Server=adserver;uid=sa;pwd=1234;dat abase=empatic") Dim da As New SqlDataAdapter("select * from producte for xml path('producte'), root('Productes')", cnn) Dim ds As New DataSet da.Fill(ds) DataGridView1.DataSource = ds.Tables(0) Dim a As String = ds.Tables(0).ToString End SubEnd Class\[/code\]What this code does is connect to a SQL Server and execute a query. This query is generated in a single XML line in a GridViewer.My question is: How I can do to get the information when in VB, show me the xml-shaped rather than a single line.The ultimate purpose of all this is that the VB to connect to SQL Server and clicking a button the program show me the xml I generated with the query.