Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/06/2011, 10:38
guillebomtrasmiti
 
Fecha de Ingreso: noviembre-2010
Ubicación: madrid
Mensajes: 478
Antigüedad: 13 años, 6 meses
Puntos: 5
Respuesta: sustituir lineas en un grid según criterio

me respondo a mi mismo...arreglado. para quien lo pueda necesitar, abrazos amigos

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

com.CommandType = CommandType.Text
com.CommandText = "UPDATE VentasAhora SET Plu = @Plu, Producto = @Prod, Cantidad = @Cant, Pts = @Eur where reg = (" & TextB.Text & ") and NombreFormaPago <> ('TARJETA CREDITO')and Fecha BETWEEN @FI AND @FF"

com.Parameters.AddWithValue("@Plu", DgTicketTipo.CurrentRow.Cells(1).Value)
com.Parameters.AddWithValue("@Prod", DgTicketTipo.CurrentRow.Cells(2).Value)
com.Parameters.AddWithValue("@Cant", DgTicketTipo.CurrentRow.Cells(3).Value)
com.Parameters.AddWithValue("@Eur", DgTicketTipo.CurrentRow.Cells(4).Value)

com.Parameters.AddWithValue("@FI", Fecha1.Value.Date.ToString("dd/MM/yyyy"))
com.Parameters.AddWithValue("@FF", Fecha2.Value.Date.ToString("dd/MM/yyyy"))

adapt.UpdateCommand = com
conexion.Open()
com.ExecuteNonQuery()
'Convert.ToDecimal(CInt(com.ExecuteNonQuery()))
conexion.Close()