Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports MySql.Data.MySqlClient
- Module Module_Koneksi
- Public conn As MySqlConnection
- Public cmd As MySqlCommand
- Public rd As MySqlDataReader
- Public da As MySqlDataAdapter
- Public ds As DataSet
- Public str As String
- Sub Connection()
- Try
- Dim str As String = "Server=localhost;user id=root;password=;database=db_penjualan"
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement