Access shared data source inside custom assembly

  • I have a database connection string hard-coded in a SQL Server 2005 Reporting Services custom assembly. Since the connection string is environment-specific (dev/prod), I would like to read the connections string from a settings file, like is typically done for web.config. Using the shared data source is also a good option.

     

    How do I accomplish this?

     

    I looked into trying to use DataSourceReference(), but that does not seem to be allowed inside of a custom assembly. Thank you.

  • Any VB .NET DLL should be able to have a "Settings" file, not just a asp.net application.  They look similar to web.config.

    I don't know what environment you're developing in, but in Visual Studio, go to the project explorer.  Select My Project, look at the Settings tab.

    In code, check out the System.Configuration namespace in the .NET framework.

    >L<

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply