This document appears to be a student report describing a technical practice involving the creation and maintenance of computer systems using Visual Basic. It includes code snippets from two Visual Basic forms (Form1 and Form2) that allow a user to log in and transition to a third form (Form3) by entering a username and password that is verified against a database table. The code opens a database connection, uses a data adapter to fill a data table, and loops through the rows to check the login credentials before closing the connection and either continuing to Form3 or displaying an error message.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
This document appears to be a student report describing a technical practice involving the creation and maintenance of computer systems using Visual Basic. It includes code snippets from two Visual Basic forms (Form1 and Form2) that allow a user to log in and transition to a third form (Form3) by entering a username and password that is verified against a database table. The code opens a database connection, uses a data adapter to fill a data table, and loops through the rows to check the login credentials before closing the connection and either continuing to Form3 or displaying an error message.
This document appears to be a student report describing a technical practice involving the creation and maintenance of computer systems using Visual Basic. It includes code snippets from two Visual Basic forms (Form1 and Form2) that allow a user to log in and transition to a third form (Form3) by entering a username and password that is verified against a database table. The code opens a database connection, uses a data adapter to fill a data table, and loops through the rows to check the login credentials before closing the connection and either continuing to Form3 or displaying an error message.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
This document appears to be a student report describing a technical practice involving the creation and maintenance of computer systems using Visual Basic. It includes code snippets from two Visual Basic forms (Form1 and Form2) that allow a user to log in and transition to a third form (Form3) by entering a username and password that is verified against a database table. The code opens a database connection, uses a data adapter to fill a data table, and loops through the rows to check the login credentials before closing the connection and either continuing to Form3 or displaying an error message.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click Me.Hide() Form2.Show() End Sub End Class
FORM2
Public Class Form2
BOTON CONTINUAR Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.Open() Dim ConsultarDatos As String = "select * from Administradores" Dim DataAdapter As New OleDb.OleDbDataAdapter(ConsultarDatos, cn) DataAdapter.Fill(dt) fila = dt.Rows.Count - 1 Do While fila >= 0 If TextBox1.Text = (dt.Rows(fila)("Usuario")) And TextBox2.Text = (dt.Rows(fila)("Contraseña")) Then Form3.Show() Exit Do Else : MsgBox("USUARIO O CONTRASEÑA INCORRECTOS") End If fila -= 1 Loop DataAdapter.Dispose() cn.Close() End Sub BOTON SALIR Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Form1.Close() End Sub End Class