Ver Mensaje Individual
  #5 (permalink)  
Antiguo 19/04/2010, 05:45
Avatar de Sergio18
Sergio18
 
Fecha de Ingreso: abril-2010
Ubicación: No quieras saberlo
Mensajes: 94
Antigüedad: 14 años, 1 mes
Puntos: 0
Respuesta: 2 dudas que tengo

Acabo de terminar el de borrar pero me falta el de actualizar, que alguien me ayude que me estoy estresando

Código vb:
Ver original
  1. 'Pregunta
  2. If MsgBox("¿Está seguro de que desea eliminar el registro?", vbQuestion + vbYesNo, Me.Caption) = vbNo Then Exit Sub
  3. 'Se elimina de la base de datos.
  4. Set cnPrueba = New ADODB.Connection
  5. cnPrueba.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\prueba.mdb;Persist Security Info=False"
  6. cnPrueba.Open
  7. cnPrueba.Execute "delete from tbl_direccion where Id = " & MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 0)
  8. cnPrueba.Close
  9. Set cnPrueba = Nothing
  10. 'Se elimina el registro del msflexgrid
  11. MSFlexGrid1.RemoveItem (MSFlexGrid1.Row)