Click here to Skip to main content
16,010,201 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ifstream issue in Visual C++ .NET 2005 Pin
yellowine14-Mar-06 10:44
yellowine14-Mar-06 10:44 
QuestionMaking an Object global Pin
viperlogic14-Mar-06 10:18
viperlogic14-Mar-06 10:18 
AnswerRe: Making an Object global Pin
BadKarma14-Mar-06 10:29
BadKarma14-Mar-06 10:29 
GeneralRe: Making an Object global Pin
viperlogic14-Mar-06 11:27
viperlogic14-Mar-06 11:27 
AnswerRe: Making an Object global Pin
Stephen Hewitt14-Mar-06 17:18
Stephen Hewitt14-Mar-06 17:18 
AnswerRe: Making an Object global Pin
ThatsAlok14-Mar-06 18:20
ThatsAlok14-Mar-06 18:20 
AnswerRe: Making an Object global Pin
ThatsAlok14-Mar-06 18:22
ThatsAlok14-Mar-06 18:22 
GeneralRe: Making an Object global Pin
viperlogic14-Mar-06 23:23
viperlogic14-Mar-06 23:23 
im getting a bit confused now!

to further exlpain. i have a basic MFC dialog app that was created using the wizard. i want to connect to a database and execute querys, i am using a wrapper for this (mysqlwrapp). to make an object of the dbconnection class i use the following in a method that is invoked by a click of a button.

CSQLConnection m_conn; //create object
m_conn.Open(_T("localhost"), _T("salaries"), _T("root"), _T("root")); //connect

then in another method i want to execute the following, but it cant see the m_conn object. this new object allows querys to database
CSQLResult res(m_conn);
res.Query(_T("SELECT Name FROM house"));

to create these objects the "MySQLWrapp.h" is included in the dialog where the objects are created and used.

so what is the best way to make the m_conn object global. could you please give example code on where and how as most of this is new to me. thanks


GeneralRe: Making an Object global Pin
Stephen Hewitt15-Mar-06 0:06
Stephen Hewitt15-Mar-06 0:06 
GeneralRe: Making an Object global Pin
viperlogic15-Mar-06 2:22
viperlogic15-Mar-06 2:22 
Questionhow to detect hyperlink from word file Pin
mk_le14-Mar-06 9:48
mk_le14-Mar-06 9:48 
QuestionExample on creating an item identifier list Pin
Chris Meech14-Mar-06 9:33
Chris Meech14-Mar-06 9:33 
AnswerRe: Example on creating an item identifier list Pin
Michael Dunn14-Mar-06 10:28
sitebuilderMichael Dunn14-Mar-06 10:28 
GeneralRe: Example on creating an item identifier list Pin
Chris Meech15-Mar-06 2:37
Chris Meech15-Mar-06 2:37 
AnswerRe: Example on creating an item identifier list Pin
Graham Bradshaw14-Mar-06 12:05
Graham Bradshaw14-Mar-06 12:05 
GeneralRe: Example on creating an item identifier list Pin
Chris Meech15-Mar-06 2:40
Chris Meech15-Mar-06 2:40 
QuestionProblem comparing 'double' values Pin
Wheatbread14-Mar-06 9:23
Wheatbread14-Mar-06 9:23 
AnswerRe: Problem comparing 'double' values Pin
Maximilien14-Mar-06 10:06
Maximilien14-Mar-06 10:06 
GeneralRe: Problem comparing 'double' values Pin
Wheatbread14-Mar-06 10:52
Wheatbread14-Mar-06 10:52 
GeneralRe: Problem comparing 'double' values Pin
Maximilien14-Mar-06 12:49
Maximilien14-Mar-06 12:49 
GeneralRe: Problem comparing 'double' values Pin
DRHuff14-Mar-06 17:33
DRHuff14-Mar-06 17:33 
Questionextending desktop window Pin
Manu_8114-Mar-06 7:09
Manu_8114-Mar-06 7:09 
Questionvery slow to open a file in huge directory Pin
mk_le14-Mar-06 6:58
mk_le14-Mar-06 6:58 
AnswerRe: very slow to open a file in huge directory Pin
Maximilien14-Mar-06 7:03
Maximilien14-Mar-06 7:03 
GeneralRe: very slow to open a file in huge directory Pin
mk_le14-Mar-06 7:05
mk_le14-Mar-06 7:05 

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.