Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/06/2011, 15:18
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

intente esto pero nada
Public Sub remplazaTicket()
'Try
Dim adapt As New OleDbDataAdapter
Dim setda As New DataSet
Dim com = conexion.CreateCommand

com.CommandType = CommandType.Text
com.CommandText = "UPDATE VentasAhora SET reg = @reg, Plu,Producto,Cantidad,Pts where Plu = @plu and NombreProd = @prod and Cantidad = @cant and Euros = @eur group by reg"
'and NombreFormaPago <> ('TARJETA CREDITO')and Fecha BETWEEN @FI AND @FF"

com.Parameters.AddWithValue("@reg", DgEstima.CurrentRow.Cells(0).Value)
com.Parameters.AddWithValue("@plu", DgTicketTipo.CurrentRow.Cells(2).Value)
com.Parameters.AddWithValue("@prod", DgTicketTipo.CurrentRow.Cells(3).Value)
com.Parameters.AddWithValue("@cant", DgTicketTipo.CurrentRow.Cells(4).Value)
com.Parameters.AddWithValue("@eur", DgTicketTipo.CurrentRow.Cells(5).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.ExecuteScalar()
conexion.Close()
'Catch
'MessageBox.Show("Compruebe si los datos que ha introducido coínciden al completo con lo esperado")
'End Try
End Sub