Visual Studio 2012 How to find the existing connection string

I need to update a project and I am looking for the DB connection string.  It is not in an obvious place.  Here is how we call the DB.
String cs3 = "INSERT INTO tblWP_TS_Day VALUES(NEWID(),@sd,@st,@et,@lit,@lot,@nt,@ot,@sit,@hot,@vat,@tt,@euk,@ct,'');";
                        Cm.ex(Cm.plw, cs3, null, ch, null, null, null, null, null, null, false);

Open in new window

The 'plw' contains the connection string but I can't find where that is set.  I right clicked on it and went to 'Go To Definition' and it brought me to this.

namespace BaseClassLibrary
    public class Cm
        public static string cp;
        public static string plc;
        public static string pld;
        public static string pldt;
        public static string plw;

        public Cm();

        public static string ex(string cmm, string fc, string cmt, Hashtable ch, string ot, Ob rob, ArrayList al, Ts gts, Dl gdl, Label rl, bool q);

Open in new window

I am trying to find where these variables are set.  I've done a search on the whole project and nothing shows up.  I am thinking there is a 'behind the scenes' spot where it can be set in a project.  I've looked in the 'Properties' page and clicked through each link and can't find it.  

Any idea?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

do you even know the name of the database? try searching for your database name or your username in the whole project, Since we can see the rest of the code I would also look into ODBC data sources in control panel. or in the project DATASOURCES
huerita37Author Commented:
Where do I find the project DataSources?  I have tried to search for my database name and can't find it.
huerita37Author Commented:
I clicked on the 'Data Sources' on the far left and it states that there are none to show.
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

do you have any  third party addons in your project? (infrgistics or similar? ), or data binding controls? if you have then the connection might be a property in one of them:

huerita37Author Commented:
Can you set variables in a library?
I mean in design mode control properties.
huerita37Author Commented:
I found it.  I was stepping through my program and it brought me to a page that had all of the variables for the DB set.  It is called Cm.cs.  I am looking for this page under the Solution Explorer and I don't see it.  Because of the extension '.cs' I looked under the 'Classes' and I don't see 'Cm.cs' there, I also looked in all of those links.

Any idea of how to find this page again?
huerita37Author Commented:
The namespace is BaseClassLibrary.  How do I get to this file?
CS is for C Sharp,
it's maybe included or called from some other file not inside your solution, open your solution folder and search for it there

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
huerita37Author Commented:
I found it by looking through the files on my computer.  This file is used on all my programs, which makes sense.  

What I don't get is that I load this library on my program but I wasn't able to search in it or access it unless I step through my code and it loads that page or I open it using 'File - Open'.  Is there any other way of opening it?
kaufmed   ( ⚆ _ ⚆ )I asked the operating system what I could do to become a better programmer. It said, "Let me give you some pointers."Commented:
Is this code obfuscated? Your variable names don't look very sensible, which is usually the kind of thing an obfuscator would do.
huerita37Author Commented:
The variables are very obfuscated but I am unable to change the code that was already written.  :-(
huerita37Author Commented:
Thank you for all of your help.  I know I didn't give much to go on but I didn't know what to give.  

Thanks again!!!
kaufmed   ( ⚆ _ ⚆ )I asked the operating system what I could do to become a better programmer. It said, "Let me give you some pointers."Commented:
OK, the variables are, but I'm specifically asking if your code is obfuscated. Because typically obfuscators will have logic built in that defeats reverse engineering the code (for hopefully obvious reasons). If this code was run through an obfuscator, then you'll probably have a difficult time tracing through it.
huerita37Author Commented:
The person who wrote the program did not write any notes or very few.  I have never heard of an obfuscator before.  I doubt the programmer used one.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.