Documente Academic
Documente Profesional
Documente Cultură
Imports MySql.Data.MySqlClient
Module Module1
Public CONN As MySqlConnection
Public DA As MySqlDataAdapter
Public DS As New DataSet
Public CMD As MySqlCommand
Public DR As MySqlDataReader
Public STR As String
Public myData As DataTable
Sub koneksi()
Try
Dim STR As String = "Server=localhost;user id=root;password=;database=tiket"
CONN = New MySqlConnection(STR)
If CONN.State = ConnectionState.Closed Then
CONN.Open()
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Module
rumus login
Imports MySql.Data.MySqlClient
Public Class Form1
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs)
Handles TextBox1.KeyPress
If e.KeyChar = Chr(13) Then
TextBox2.Focus()
End If
End Sub
TextBox1.Text = DGV4.Rows(e.RowIndex).Cells(0).Value
TextBox2.Text = DGV4.Rows(e.RowIndex).Cells(1).Value
TextBox3.Text = DGV4.Rows(e.RowIndex).Cells(2).Value
TextBox4.Text = DGV4.Rows(e.RowIndex).Cells(3).Value
ComboBox1.Text = DGV4.Rows(e.RowIndex).Cells(4).Value
TextBox6.Text = DGV4.Rows(e.RowIndex).Cells(5).Value
ComboBox2.Text = DGV4.Rows(e.RowIndex).Cells(6).Value
TextBox8.Text = DGV4.Rows(e.RowIndex).Cells(7).Value
Call segar3()
End Sub