Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/08/2011, 12:39
guillebomtrasmiti
 
Fecha de Ingreso: noviembre-2010
Ubicación: madrid
Mensajes: 478
Antigüedad: 13 años, 5 meses
Puntos: 5
Pregunta no me carga el grid con seleccion combo

hola amigos, tengo esto;

Public Sub cargainventariocombo()

Dim adapt As New OleDbDataAdapter
Dim setda As New DataSet
Dim com = conexion.CreateCommand


com.CommandType = CommandType.Text
com.CommandText = "SELECT Fecha,Plu,NomProducto,Stock From GeneralAlmacen Where Fecha = @combo1 group by Fecha,Plu,NomProducto,Stock"
com.Parameters.AddWithValue("@combo1", ComboInventarios.SelectedValue.ToString)

adapt.SelectCommand = com
adapt.Fill(setda, "GeneralAlmacen")


'aquí cargo el datasource y el datamenber del datagrid
DgInventario.DataSource = setda
DgInventario.DataMember = "GeneralAlmacen"
DgInventario.Refresh()

Private Sub ComboInventarios_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboInventarios.SelectedIndexChanged
cargainventariocombo()
End Sub

y me da este error
No coinciden los tipos de datos en la expresión de criterios.
alguna idea?