Hello community
I have an application on visual basic(VS2008) and the use a service web. the application have 3 functions.
1.The tyipical hello word
2.show data from a table
3.inserts datas
In the second function is wrote this way
<WebMethod()> _
Public Function SelectData(ByVal Obra As String)
Dim Con As String
Dim command As String
Dim result As String
Dim fieldname As String = "Description"
command = "select Description from Site where Code='" + code.Trim() + "'"
result = ""
Using connection As New SqlConnection(Con)
Dim query As New SqlCommand(command, connection)
connection.Open()
Dim reader As SqlDataReader = query.ExecuteReader()
While reader.Read()
result = reader.Item(fieldname).ToString
End While
reader.Close()
End Using
Return result
End Function
here call the method
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim serv As New Servicio.Service1
Dim resultadoserv As Xml.XmlElement
TextBox3.Text = serv.SelectData(TextBox2.Text)
End Sub
And the Web service return this result by internet explorer
="1.0"="UTF-8"
<anyType xmlns="http://tempuri.org/" xmlns:d1p1="http://www.w3.org/2001/XMLSchema-instance" d1p1:type="q1:string" xmlns:q1="http://www.w3.org/2001/XMLSchema">QUERY RESULT </anyType>
How can I get two o more results in xml response on differents tags?
if need more information to understand the problem let me know please.
Greetings people.