Ver Mensaje Individual
  #9 (permalink)  
Antiguo 06/04/2009, 09:53
Avatar de Dradi7
Dradi7
 
Fecha de Ingreso: junio-2008
Ubicación: Peru - Lima
Mensajes: 1.518
Antigüedad: 15 años, 11 meses
Puntos: 220
Respuesta: llenar dataSet con Store Procedure

Tu error puede estar en 2 problemas primero no has abierto la Base de Datos y segundo de repente tu consulta no te devuelve ningun valor

Código:
Dim oConn As SqlConnection
                       oConn = New SqlConnection("Server=server\sqlexpress;integrated security=true;database=databases;uid=;pwd=;")
                if Oconn.state = 1 then Oconn.close()
                Oconn.open()
                Dim table As New DataTable
                Dim Adp As New SqlDataAdapter()
                Adp.SelectCommand = New SqlCommand() ' Creando una Instancia de SqlCommand
                Adp.SelectCommand.Connection = oConn 'Conexión
                Adp.SelectCommand.CommandText = "s_proc_SP"
                Adp.SelectCommand.CommandType = CommandType.StoredProcedure
                Adp.SelectCommand.Parameters.Add("@año", SqlDbType.Int, 4)
                Adp.SelectCommand.Parameters("@año").Value = ano
                Adp.SelectCommand.Parameters.Add("@mes", SqlDbType.Int, 4)
                Adp.SelectCommand.Parameters("@mes").Value = mes
                Adp.Fill(table)
                reportGD.DataSource = table
a ver prueba ahi si es q te sale
__________________
La clave de todo triunfador es eliminar todas sus excusas y sus limitaciones