Dim array_punti(1000) As LatLng
Dim count as Int = 0 '<--- why Long?
Dim MyRs As ResultSet = MyDB.ExecQuery("select codice, latitudine, longitudine from LOGPERCORSI")
Dim Lat, Lng As Double
Do While MyRs.NextRow
Lat = MyRs.GetDouble("latitudine")
Lng = MyRs.GetDouble("longitudine")
array_punti(count).Initialize(Lat, Lng)
Count = Count + 1
Loop
gmap.AddPolyline( array_punti, 4, fx.Colors.Cyan)