Solved

How to detemine Connection

Posted on 2004-09-09
7
182 Views
Last Modified: 2010-04-01
I have this C++ utility, written using MFC. I am VERY new to C++ and MFC, so i am still trying to figure out some somethings. In the app that I have how to i determine what the connection string is....i mean the app connects to some remote DB, but i wanna make sure which one it is. I know there has to be a string mentioned somewhere in the program but i cant find it....is there a quick way to find it?

Thanks
0
Comment
Question by:KalluMama
  • 3
  • 3
7 Comments
 
LVL 17

Expert Comment

by:rstaveley
ID: 12016968
If you could list the classes in your project, we might be able to give you a nudge in the right direction, assumming the application was developed using a wizard.
0
 

Author Comment

by:KalluMama
ID: 12017023
Here are a list of the classes:

 
0
 

Author Comment

by:KalluMama
ID: 12017054
Here are a list of the classes:

CAboutDlg
CAddNewDDlg
CDBMaintainUtilApp
CDBMaintainUtilDlg
CIDEditDlg
CIDValueListCtl
CPasswordDlg
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 17

Expert Comment

by:rstaveley
ID: 12017056
8-)
0
 
LVL 17

Expert Comment

by:rstaveley
ID: 12017167
Try pasting CDBMaintainUtilApp.cpp here
0
 

Author Comment

by:KalluMama
ID: 12017276
// DBMaintainUtil.h : main header file for the DBMAINTAINUTIL application
//

#if !defined(AFX_DBMAINTAINUTIL_H__B2C911BB_7668_4CF3_8188_A9D5B4E5C542__INCLUDED_)
#define AFX_DBMAINTAINUTIL_H__B2C911BB_7668_4CF3_8188_A9D5B4E5C542__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
      #error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"            // main symbols
#include "idtable.h"

/////////////////////////////////////////////////////////////////////////////
// See SSJobSetupUtil.cpp for the implementation of this class
//

class CDBMaintainUtilApp : public CWinApp
{
public:
      CDBMaintainUtilApp();

// Overrides
      // ClassWizard generated virtual function overrides
      //{{AFX_VIRTUAL(CDBMaintainUtilApp)
      public:
      virtual BOOL InitInstance();
      virtual int ExitInstance();
      //}}AFX_VIRTUAL

// Implementation
      _ConnectionPtr m_pServerJobDBConn;

protected:
// Implementation
      CString m_strAppPath;
      void LoadProgramProfileSettings();


      //{{AFX_MSG(CDBMaintainUtilApp)
            // NOTE - the ClassWizard will add and remove member functions here.
            //    DO NOT EDIT what you see in these blocks of generated code !
      //}}AFX_MSG
      DECLARE_MESSAGE_MAP()
};

inline _ConnectionPtr GetServerJobDBConn()
      {       return ((CDBMaintainUtilApp*)AfxGetApp())->m_pServerJobDBConn; }

extern const long g_nLocalIDStart;
extern const long g_nRemoteDStart;
extern bool g_bIsUserAdmin;

extern CMapIDTables g_mapIDTables;

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DBMAINTAINUTIL_H__B2C911BB_7668_4CF3_8188_A9D5B4E5C542__INCLUDED_)
0
 
LVL 39

Accepted Solution

by:
itsmeandnobodyelse earned 500 total points
ID: 12017602
Check where _ConnectionPtr is defined and post header and implementation of that class (probably _Connection).

Regards, Alex
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now