Ver Mensaje Individual
  #4 (permalink)  
Antiguo 31/03/2004, 09:29
Avatar de RootK
RootK
Moderador
 
Fecha de Ingreso: febrero-2002
Ubicación: México D.F
Mensajes: 8.004
Antigüedad: 23 años
Puntos: 50
Te podría quedar así:

Cita:
..
....
Dim MiArray(0) As String
Dim i As Int16 = 0

<WebMethod()> Public Function DevuelveDatos() as Array
Try
CN.Open()
DR = Cmd.ExecuteReader
While DR.Read
MiArray(i) = "Nombre: " & CStr(DR.Item("nombre"))
i = i + 1
ReDim Preserve MiArray(i) 'Aqui redimensiono para hacerlo dinámico
End While
Catch Ex As Exception
Response.write (Ex.Message)
Finally
DR.Close()
CN.Close()
return MiArray
End Try
End Function
Y ya despues para llamarlo:

Dim ServicioWeb as new localhost.service1
Dim UnArray as Array
UnArray=ServiciosWeb.DevuelveDatos()


Suerte