Codigo Eliminar Y Actualizar.docx

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Codigo Eliminar Y Actualizar.docx as PDF for free.

More details

  • Words: 195
  • Pages: 1
CODIGO ELIMINAR Dim eliminar As String Dim respuesta As Byte respuesta = MsgBox("¿ESTA SEGURO QUE DESEA ELIMINAR EL REGISTRO?: ", vbYesNo, "ELIMINAR") If respuesta = vbYes Then eliminar = "DELETE *FROM Estudiante where Doc_identidad= " & txtDoc.Text & "" comandos = New OleDb.OleDbCommand(eliminar, conex) comandos.ExecuteNonQuery() MsgBox("REGISTRO ELIMINADO", vbInformation, "ELIMINADO") End If

CODIGO MODIFICAR O ACTUALIZAR

Dim respuesta As Byte respuesta = MsgBox("¿ESTA SEGURO QUE DESEA MODIFICAR EL REGISTRO?: ", vbYesNo, "MODIFICAR") If respuesta = vbYes Then Dim actualizar As String Try actualizar = "UPDATE Estudiante SET Doc_identidad = '" & txtDoc.Text & "' , Nom_estu = '" & txtnom.Text & "', Telefono_estu = '" & txttel.Text & "', Direccion_estu = '" & txtdir.Text & "', Grupo = '" & txtgrupo.Text & "', Grado = '" & txtgrado.Text & "', Email = '" & txtemail.Text & "', Fecha_naci = '" & Datefecha.Text & "', Acudiente = '" & txtacudiente.Text & "', Tel_acudiente = '" & txttelacu.Text & "' WHERE Doc_identidad = " & txtDoc.Text & "" comandos = New OleDb.OleDbCommand(actualizar, conex) comandos.ExecuteNonQuery() MsgBox("EL REGISTRO SE MODIFICO CORRECTAMENTE", vbInformation, "ACTUALIZADO") Catch ex As Exception MsgBox(" A OCURRIDO UN ERROR", vbExclamation, "ERROR") End Try End If

End Sub

Related Documents

Eliminar Drm.docx
April 2020 15
Codigo Genetico Y Adn
November 2019 20
Codigo
November 2019 38
Codigo
November 2019 42