Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Data.SqlClient
- Public Class Database
- Public cmd As SqlCommand
- Public query As String
- Public konek As SqlConnection
- Public Sub koneksi()
- Try
- konek = New SqlConnection("data source = KK-PC\MSSQLSERVER1; initial catalog = crud; integrated security = true")
- konek.Open()
- 'MsgBox("koneksi berhasil :)") atau dihapus
- Catch ex As Exception
- MsgBox("Koneksi gagal! : " + ex.Message)
- End Try
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement