I have a webservice that needs to return a paired list, such as created by an
arraylist. The problem appears to be in serlizing the xml. Any help on how
to return a paired list or arraylist would be gratly appreciated.
***********code
<WebMethod()> _
Public Function getMyData() As ArrayList
Dim lvSqlString = "SELECT * FROM PRODUCTS"
Dim myData As New ArrayList
Dim lvSqlCmd As New MySqlCommand
Dim SqlConnection1 As New MySqlConnection
Dim rdr As MySqlDataReader
lvSqlCmd = SqlConnection1. CreateCommand
SqlConnection1. ConnectionStrin g = gvConnectString
lvSqlCmd.Comman dText = lvSqlString
SqlConnection1. Open()
rdr = lvSqlCmd.Execut eReader()
Dim bozo As String = ""
Try
Do While rdr.Read
myData.Add("Pro ductID")
myData.Add(rdr( "ProductID" ))
myData.Add("Pro ductDesc")
myData.Add(rdr( "ProductDes c"))
myData.Add("Pro ductGraphic")
myData.Add(rdr( "ProductGraphic "))
Loop
Finally
If Not (rdr Is Nothing) Then
rdr.Close()
rdr = Nothing
End If
If Not (SqlConnection1 Is Nothing) Then
SqlConnection1. Close()
SqlConnection1 = Nothing
End If
End Try
Return myData
End Function
*********** end code