CHPP Development/VB.NET/: Difference between revisions

From Hattrick
Jump to navigationJump to search
No edit summary
 
No edit summary
Line 2: Line 2:




Protected Function Get_Recommended_Server()
Protected Function Get_Recommended_Server()
     Dim xmlds As New System.Data.DataSet
     Dim xmlds As New System.Data.DataSet
     Dim xmlTable As New System.Data.DataTable
     Dim xmlTable As New System.Data.DataTable
Line 10: Line 10:
     xmldr = xmlTable.Select(Nothing, Nothing, Data.DataViewRowState.CurrentRows)
     xmldr = xmlTable.Select(Nothing, Nothing, Data.DataViewRowState.CurrentRows)
     Return (xmldr(0)(5).ToString)
     Return (xmldr(0)(5).ToString)
End Function
End Function

Revision as of 17:51, 27 February 2006

Code #1: Getting the recommended server


Protected Function Get_Recommended_Server()
   Dim xmlds As New System.Data.DataSet
   Dim xmlTable As New System.Data.DataTable
   Dim xmldr As System.Data.DataRow()
   xmlds.ReadXml("http://www.hattrick.org/common/menu.asp?outputType=XML")
   xmlTable = xmlds.Tables("HattrickData")
   xmldr = xmlTable.Select(Nothing, Nothing, Data.DataViewRowState.CurrentRows)
   Return (xmldr(0)(5).ToString)
End Function