Programming Journal C#, Java, SQL and to a lesser extent HTML, CSS, XML, and regex. I made this so other programmers could benefit from my experience.

Saturday, August 15, 2009

Use a Class to Store ConnectionString

This appears the best way to store database ConnectionString objects in a given Class:

internal static string GetConnectionString(string specifiedConnectionString, bool lookupConnectionString, bool appLevel)
//Your Conn String goes here!!
return Factory.ConnectionString;

Notice that a static Class is used since we don't need to waste memory instantiating strings.

Specifically mentioned was to modify the SQLConnectionHelper.cs from:

1 comment:

Anonymous said...

Greetings! I know this is kind of off topic but I was wondering if you
knew where I could get a captcha plugin for my comment form?
I'm using the same blog platform as yours and I'm
having difficulty finding one? Thanks a lot!

Check out my site website doesnt