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.ConnectionString = gvConnectString
lvSqlCmd.CommandText = lvSqlString
SqlConnection1.Open()
rdr = lvSqlCmd.ExecuteReader()
Dim bozo As String = ""
Try
Do While rdr.Read
myData.Add("ProductID")
myData.Add(rdr("ProductID"))
myData.Add("ProductDesc")
myData.Add(rdr("ProductDesc"))
myData.Add("ProductGraphic")
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