locked
database connection string for design time RRS feed

  • Question

  • I have a cutom activity with a designer attached to it. In the designer I need to access a sql database. Where should I configure the connection string. Is there sort of xml.config for this?

    Monday, August 9, 2010 10:56 AM

Answers

  • Maybe you could use devenv.exe.config... but it seems a little unexpected. What about just deciding on your own custom config file, and load that? Or use registry keys, etc.
    Tim
    • Marked as answer by emikelsoft Thursday, August 12, 2010 4:25 PM
    • Edited by Tim Lovell-Smith Monday, August 16, 2010 4:38 PM spelling
    Wednesday, August 11, 2010 3:52 AM

All replies

  • Hi emikelsoft,

    You could use a named connectionString in your config file (app.config or web.config).

    Or else ou could liste all connectionString in the connectionString configmanager

    look MSDN for more explains about it :

    http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.aspx


    Jérémy Jeanson MCP, MCTS http://blogs.codes-sources.com/JeremyJeanson/ (French or English spoken)
    • Proposed as answer by JeremyJeansonMVP Monday, August 9, 2010 3:13 PM
    • Unproposed as answer by emikelsoft Tuesday, August 10, 2010 9:03 AM
    Monday, August 9, 2010 3:13 PM
  • The problem is, that at design time we are in the process of visual studio, therefore I think we need to rehost the designer and in the App.config of the designer I can specify the connection string. Is there a way to configure it for visual studio?
    Tuesday, August 10, 2010 9:05 AM
  • Maybe you could use devenv.exe.config... but it seems a little unexpected. What about just deciding on your own custom config file, and load that? Or use registry keys, etc.
    Tim
    • Marked as answer by emikelsoft Thursday, August 12, 2010 4:25 PM
    • Edited by Tim Lovell-Smith Monday, August 16, 2010 4:38 PM spelling
    Wednesday, August 11, 2010 3:52 AM