home *** CD-ROM | disk | FTP | other *** search
/ Programming Microsoft Visual Basic .NET / Programming Microsoft Visual Basic .NET (Microsoft Press)(X08-78517)(2002).bin / 24 aspnet applications / aspnetapplications / connstrings.vb < prev    next >
Encoding:
Text File  |  2002-03-17  |  1.4 KB  |  36 lines

  1. Module ConnStrings
  2.  
  3.     ' Public variables to access BIBLIO.MDB and SQL Server's PUBS.
  4.  
  5.     ' The connection string for biblio.mdb (using OLE DB provider)
  6.     Public BiblioConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" _
  7.        & "Data Source=E:\Program Files\Microsoft Visual Studio\VB98\BIBLIO.MDB;"
  8.  
  9. #Const USE_WINDOWS_SECURITY = False
  10.  
  11. #If USE_WINDOWS_SECURITY Then
  12.     ' USE THESE STRINGS IF YOU ADDED ASPNET TO THE LIST OF SQL SERVER USERS
  13.     ' AND YOU WANT TO USE INTEGRATED SECURITY.
  14.  
  15.     ' The connection string for Sql Server's Pubs (using the OLE DB provider)
  16.     Public OledbPubsConnString As String = "Provider=SQLOLEDB.1;Data Source=.;" _
  17.         & "Integrated Security=SSPI;Initial Catalog=pubs"
  18.  
  19.     ' The connection string for Sql Server's Pubs (using the OLE DB provider)
  20.     Public SqlPubsConnString As String = "Data Source=.;" _
  21.         & "Integrated Security=SSPI;Initial Catalog=pubs"
  22. #Else
  23.     ' USE THESE STRINGS IF YOU WANT TO USE SQL SERVER SECURITY. 
  24.  
  25.     ' The connection string for Sql Server's Pubs (using the OLE DB provider)
  26.     Public OledbPubsConnString As String = "Provider=SQLOLEDB.1;Data Source=.;" _
  27.         & "User ID=sa;Password=;Initial Catalog=pubs"
  28.  
  29.     ' The connection string for Sql Server's Pubs (using the OLE DB provider)
  30.     Public SqlPubsConnString As String = "Data Source=.;" _
  31.         & "User ID=sa;Password=;Initial Catalog=pubs"
  32. #End If
  33.  
  34.  
  35. End Module
  36.