Friday, April 15, 2011

Configuration for SQL Server Based Assembly

I have an assembly deployed to SQL Server that performs an export to an accounting system SDK. The reasons that this is deployed to SQL Server are beyond my control, and I cannot modify the target database.

In development, I moved several dynamic queries from hard-coding to text files outside the application, so that queries can be tweaked if necessary after deployment. Is there a way I can 'inform' my assembly as to the location of these text files on the server machine, without using a database field?

From stackoverflow
  • It seems that adding the text files to the project as embedded resources is a better avenue to follow. This absolves the deployer of any responsibility for configuring the assembly or deploying the text files.

    ProfK : This does reduce the accessibility of the files for maintenance, but I can automate a rebuild for support, with them only having access to the query files.
  • You have to read the path of text files from some well know locations like:

    • registry
    • application local storage
    • predefined directory

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.