Click here to Skip to main content
15,914,327 members
Home / Discussions / C#
   

C#

 
QuestionHow to store string queries in c# function Pin
nitin_ion30-Sep-12 17:52
nitin_ion30-Sep-12 17:52 
I am using string queries
SELECT CASE WHEN COALESCE(title2, title)='RUNTIME PARAMETER'
in function.
It is ok but I want them not to be written in the function because anyone developer can mess it up. There will be lot of queries which will get run time parameters also from functions.

I want it somewhere so that it is safe. But it should be available during run time, means if i want to replace a query the i should be able to so that without the need of building and deploying the files.

One way i was thinking is to use either resource files or config files but i cannot make mind. I don't want the performance to take a hit yet to maintain flexibility and maintainability.

Using resource files means to load read text which will incur some performance loss but is better than config files as they are not safe and easily readable.

Any suggestion?
AnswerRe: How to store string queries in c# function Pin
Pete O'Hanlon30-Sep-12 19:33
mvePete O'Hanlon30-Sep-12 19:33 
QuestionC# 2008 update sql server table Pin
dcof30-Sep-12 14:19
dcof30-Sep-12 14:19 
QuestionQuartzTypeLib and subtitles Pin
audaijihad30-Sep-12 6:22
audaijihad30-Sep-12 6:22 
AnswerRe: QuartzTypeLib and subtitles Pin
Ravi Bhavnani30-Sep-12 6:47
professionalRavi Bhavnani30-Sep-12 6:47 
GeneralRe: QuartzTypeLib and subtitles Pin
audaijihad30-Sep-12 11:33
audaijihad30-Sep-12 11:33 
QuestionUpdating a Label in 2 forms simultaneously Pin
CSharpNewbie 229-Sep-12 21:37
CSharpNewbie 229-Sep-12 21:37 
AnswerRe: Updating a Label in 2 forms simultaneously Pin
Smart Arab29-Sep-12 22:40
Smart Arab29-Sep-12 22:40 
AnswerRe: Updating a Label in 2 forms simultaneously Pin
Dave Kreskowiak30-Sep-12 3:01
mveDave Kreskowiak30-Sep-12 3:01 
GeneralRe: Updating a Label in 2 forms simultaneously Pin
CSharpNewbie 230-Sep-12 12:20
CSharpNewbie 230-Sep-12 12:20 
AnswerRe: Updating a Label in 2 forms simultaneously Pin
Emdad_54821-Oct-12 1:44
Emdad_54821-Oct-12 1:44 
QuestionC# check for null in linq Pin
dcof29-Sep-12 9:05
dcof29-Sep-12 9:05 
AnswerRe: C# check for null in linq Pin
Richard MacCutchan29-Sep-12 21:45
mveRichard MacCutchan29-Sep-12 21:45 
QuestionEncrypt text file in C# Pin
gibsray29-Sep-12 7:09
gibsray29-Sep-12 7:09 
AnswerRe: Encrypt text file in C# Pin
Smart Arab29-Sep-12 7:20
Smart Arab29-Sep-12 7:20 
AnswerRe: Encrypt text file in C# Pin
Sandip.Nascar29-Sep-12 8:53
Sandip.Nascar29-Sep-12 8:53 
QuestionPattern for creating class libraries Pin
nitin_ion28-Sep-12 20:32
nitin_ion28-Sep-12 20:32 
AnswerRe: Pattern for creating class libraries Pin
n.podbielski28-Sep-12 21:51
n.podbielski28-Sep-12 21:51 
QuestionVisual Studio 10 Naming Issue? Pin
PDTUM28-Sep-12 9:57
PDTUM28-Sep-12 9:57 
AnswerRe: Visual Studio 10 Naming Issue? Pin
Emmanuel Medina28-Sep-12 11:07
professionalEmmanuel Medina28-Sep-12 11:07 
GeneralRe: Visual Studio 10 Naming Issue? Pin
PDTUM28-Sep-12 13:31
PDTUM28-Sep-12 13:31 
AnswerRe: Visual Studio 10 Naming Issue? Pin
Smart Arab28-Sep-12 22:20
Smart Arab28-Sep-12 22:20 
GeneralRe: Visual Studio 10 Naming Issue? Pin
PDTUM3-Oct-12 5:25
PDTUM3-Oct-12 5:25 
GeneralRe: Visual Studio 10 Naming Issue? Pin
Smart Arab3-Oct-12 7:01
Smart Arab3-Oct-12 7:01 
QuestionC# database error Pin
classy_dog28-Sep-12 6:50
classy_dog28-Sep-12 6:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.