CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: VB.NET

Get Connection

149 Views
Copy Code Show/Hide Line Numbers
   1:  Imports System.Data.SqlClient
   2:   
   3:  Public Class PayablesDB
   4:   
   5:      Public Shared Function GetConnection() As SqlConnection
   6:          Dim connectionString As String _
   7:              = "Data Source=localhost\SqlExpress;Initial Catalog=Payables;" _
   8:              & "Integrated Security=True"
   9:          Return New SqlConnection(connectionString)
  10:      End Function
  11:   
  12:  End Class
by mbbrennan
  January 02, 2010 @ 3:05pm

Add a comment


Report Abuse
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate