Imports System.Data.SqlClient
----------------------------------------------------------------------------------------------------------
Module modulkoneksi
Public mycn As New SqlConnection
----------------------------------------------------------------------------------------------------------
Sub bukaconn()
mycn.ConnectionString = "data source=.\sqlexpress;initial catalog=dbpejualan; integrated security=SSPI"
If mycn.State = ConnectionState.Closed Then
Try
mycn.Open()
Catch ex As Exception
MsgBox(ex.Message)
Application.Exit()
End Try
End If
End Sub
End Module
---------------------------------------------------------------------------------------------------------
semoga bermanfaat ....
----------------------------------------------------------------------------------------------------------
Module modulkoneksi
Public mycn As New SqlConnection
----------------------------------------------------------------------------------------------------------
Sub bukaconn()
mycn.ConnectionString = "data source=.\sqlexpress;initial catalog=dbpejualan; integrated security=SSPI"
If mycn.State = ConnectionState.Closed Then
Try
mycn.Open()
Catch ex As Exception
MsgBox(ex.Message)
Application.Exit()
End Try
End If
End Sub
End Module
---------------------------------------------------------------------------------------------------------
semoga bermanfaat ....
Comments
Post a Comment