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

Hola, alguién sabe por que me da un error de que microsoft jet no puede encontrar la tabla o consulta 2?¿?.... gracias
CODIGO;
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

com.CommandType = CommandType.Text
com.CommandText = "UPDATE " & DgTotales.Columns.Item("Pts").Index.ToString & " SET Pts =ROUND (Pts /" & TxtPorcentaje.Text & " *100,2) Where NombreFormaPago <> ('TARJETA CREDITO')"
adapt.Fill(setda, DgTotales.Columns.Item("Pts").Index.ToString)
'UPDATE precios SET Precio=ROUND(Precio * (1 + $porcentaje/100),2)
End Sub