Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. Dim Conector As String = "server=localhost;username=root;password=root;database=sistemaintegral"
  2. Dim ConectorBD As New MySqlConnection(Conector)
  3. Dim Conexion As New MySqlConnection("datasource=localhost; username=root; password=root; database=sistemaintegral")
  4. Dim Comando As New MySqlCommand() 'crear objeto comando que ejecutar la Query o sentencia SQL
  5.  
  6. Dim res As String = Ejecutar("INSERT INTO alumno (nom_alumno, apellido_pater_alum, apellido_mater_alum, dir_alumno, tel_alumno, entidad_fed, curp_alumno, genero_alumno, clave_alum, tutor_alum, grado, grupo, promedio_total) VALUES ('" & nom & "','" & ama & "','" & apa & "','" & dir & "','" & tel & "','" & ent & "','" & curp & "','" & genero & "','" & clave & "','" & tutor & "','" & grado & "','" & grupo & "','" & prom & "')")
  7. 'nom, apa, ama, dir, tel, ent, curp, genero, clave, tutor, grado, grupo, prom
  8. If res = "1" Then
  9. MsgBox("Registro Guardado")
  10. Cmax = 0
  11. Mov = 0
  12. Else
  13. MsgBox("No se Guardo el Registro " & Query)
  14. End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement