ben1984
ben1984

Reputation: 101

Configuration File in Visual C# Database Sql Server Project

Isit possible to use app.config file in Visual C# Database Sql Server Projects like any other winforms or webform projects.

Thanks in advance Judes

Upvotes: 1

Views: 550

Answers (1)

Damien_The_Unbeliever
Damien_The_Unbeliever

Reputation: 239714

Not really, no.

You're effectively creating a class library project. Although you can add app.config files to such projects (normal ones, rather than SQL CLR ones), they're not actually usable at runtime (without jumping through a lot of hoops) - only the config file associated with the EXE project gets used.

Added to which, in this case, your code will actually be running inside the SQL Server process.

Upvotes: 1

Related Questions