Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/06/2006, 00:40
jorge1980
 
Fecha de Ingreso: mayo-2005
Mensajes: 274
Antigüedad: 19 años, 10 meses
Puntos: 0
Error:Dataset

Hola! Alguien puede ayudareme a determinar el origen del siguiente error:"El valor no puede ser nulo. Nombre del parámetro: dataSet"

Les muestro el codigo:

Private Function MostrarSectores()
Dim con As String
con = CStr(Application("SqlConnection"))

Dim sqlcon As New SqlConnection(con)

Dim daSectores As New SqlDataAdapter
Dim dsSectores As DataSet

daSectores.SelectCommand = New SqlCommand("CargarSectores", sqlcon)
daSectores.SelectCommand.CommandType = CommandType.StoredProcedure

sqlcon.Open()
daSectores.SelectCommand.ExecuteNonQuery()
daSectores.Fill(dsSectores, "Sectores")
sqlcon.Close()

Dim fila As DataRow
For Each fila In dsSectores.Tables("Sectores").Rows
Dim Agregar As New ListItem
Agregar.Text = fila("NOMBRE")
Agregar.Value = fila("ID_SECTOR").GetType.ToString
lstsector.Items.Add(Agregar)
Next
End Function

Gracias!