Last active
August 29, 2015 14:01
-
-
Save k4m4r82/66ace174b158f1db0bb7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Function GetOpenConnection() As SqlConnection | |
Dim conn As SqlConnection = Nothing | |
Try | |
' . = localhost | |
' sqlexpress2008 = instance sql server | |
' retail = nama database | |
Dim strConn = "Data Source=.\sqlexpress2008;Initial Catalog=Retail;Integrated Security=True" | |
conn = New SqlConnection(strConn) | |
conn.Open() | |
Catch ex As Exception | |
End Try | |
Return conn | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment