David Williams

Who's sruffy looking?

  Home  |   Contact  |   Syndication    |   Login
  19 Posts | 0 Stories | 16 Comments | 0 Trackbacks

News



Twitter












Archives

Post Categories

Microsoft Development

We need to access a Business Objects/Crystal Enterprise Server from our Web application, and are storing connection information in our webconfig file.  Rather than several different settings in Web.Config, I created a New Connection string property using standard the standard SQL Server connection string syntax, and used SQLConnectionStringBuild to parse the Crystal connection string.  When the username/password is first needed, Initialize is called, and the connection sting is pulled from the config file:
 
    Public Sub Initialize()
        Dim CeConnectionString As String
        CeConnectionString = ConfigurationManager.ConnectionStrings("CE").ConnectionString
        Dim connBuilder As New SqlConnectionStringBuilder(g_ceConnString)
 
        g_strDataSource = connBuilder.DataSource
        g_ceUsername = connBuilder.UserID
        g_cePassword = connBuilder.Password
    End Sub
 
 
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
posted on Monday, January 29, 2007 2:11 PM