Ver Mensaje Individual
  #11 (permalink)  
Antiguo 26/04/2011, 13:27
guillebomtrasmiti
 
Fecha de Ingreso: noviembre-2010
Ubicación: madrid
Mensajes: 478
Antigüedad: 13 años, 5 meses
Puntos: 5
Respuesta: suma % en un GRID

he realizado este cambio, pero sigue igual, mismo error
Public Sub sumarporcentaje()

Dim resta As New Integer
Dim resultado As New Integer

Dim com = conexion.CreateCommand

Dim adapt As New OleDbDataAdapter
Dim setda As New DataSet

adapt.SelectCommand = com
For Each row As DataGridViewRow In DgTotales.Rows
com.CommandType = CommandType.Text
com.CommandText = "UPDATE " & row.Cells("Pts").Value.ToString & " SET Pts =ROUND (Pts /" & TxtPorcentaje.Text & " *100,2) Where " & row.Cells("NombreFormaPago").Value.ToString & " <> ('TARJETA CREDITO')"
MessageBox.Show(CStr(adapt.Fill(setda, "IntroduccionDeVentasAhora")))
adapt.Fill(setda, "IntroduccionDeVentasAhora")

Next