Click here to Skip to main content
15,918,889 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalcontrolling characters entered into an edit box Pin
Raghunandan S1-Apr-03 19:22
Raghunandan S1-Apr-03 19:22 
GeneralRe: controlling characters entered into an edit box Pin
Anonymous1-Apr-03 20:42
Anonymous1-Apr-03 20:42 
GeneralRe: controlling characters entered into an edit box Pin
JensB1-Apr-03 23:02
JensB1-Apr-03 23:02 
GeneralRe: controlling characters entered into an edit box Pin
jhwurmbach1-Apr-03 23:11
jhwurmbach1-Apr-03 23:11 
GeneralRe: controlling characters entered into an edit box Pin
jhwurmbach1-Apr-03 23:15
jhwurmbach1-Apr-03 23:15 
GeneralError: Cannot open program database Pin
Ahsan Abbas1-Apr-03 19:10
Ahsan Abbas1-Apr-03 19:10 
GeneralRe: Error: Cannot open program database Pin
peterchen2-Apr-03 6:16
peterchen2-Apr-03 6:16 
GeneralSDI using CApp in other Class.... Pin
Exceter1-Apr-03 18:54
Exceter1-Apr-03 18:54 
This is an SDI Application, I am connecting to the Database using a Dialog box, and m_pConn to TRUE if the connecion is established. I want to use the forced connection but have the error.
What I am doing wrong?
how to solve this error:

BOOL CStform::OnInitDialog()
{
CDialog::OnInitDialog();

// TODO: Add extra initialization here
_RecordsetPtr m_pRecordset;
CStudentApp *App;
_bstr_t bstrQuery("SELECT * FROM StudV");
_variant_t vRecsAffected(0L);

try {
_CommandPtr m_pCommand;
m_pCommand.CreateInstance (__uuidof (Command));
m_pCommand->ActiveConnection = App->m_pConn; // Formerly opened connection pointer
m_pCommand->CommandText = "Select * From Student";

//m_pRecordset = App.m_pConn->Execute(bstrQuery, vRecsAffected, adOptionUnspecified);
//if (!m_pRecordset->GetadoEOF()) {

}
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}

error C2248: 'CStudentApp::m_pConn' : cannot access protected member declared in class 'CStudentApp'
error C2317: 'try' block starting on line '46' has no catch handlers
error C2059: syntax error : 'return'
error C2059: syntax error : '}'
error C2143: syntax error : missing ';' before '}'
error C2059: syntax error : '}'

GeneralRe: SDI using CApp in other Class.... Pin
Joan M1-Apr-03 19:14
professionalJoan M1-Apr-03 19:14 
GeneralProblem of asterisk's Pin
rohit.dhamija1-Apr-03 18:51
rohit.dhamija1-Apr-03 18:51 
GeneralExchange of values among different classes of same project Pin
summo1-Apr-03 18:50
summo1-Apr-03 18:50 
GeneralRe: Exchange of values among different classes of same project Pin
Woody Green2-Apr-03 3:22
Woody Green2-Apr-03 3:22 
GeneralChange display font setting (dpi) Pin
mijarral1-Apr-03 18:21
mijarral1-Apr-03 18:21 
GeneralRe: Change display font setting (dpi) Pin
Dudi Avramov2-Apr-03 0:54
Dudi Avramov2-Apr-03 0:54 
GeneralRe: Change display font setting (dpi) Pin
mijarral4-Apr-03 16:25
mijarral4-Apr-03 16:25 
GeneralRegistry vs MS Service Pin
rohit.dhamija1-Apr-03 18:01
rohit.dhamija1-Apr-03 18:01 
GeneralRe: Registry vs MS Service Pin
Anders Molin1-Apr-03 22:02
professionalAnders Molin1-Apr-03 22:02 
General“EDIT” window and string storing Pin
sathyashrayan1-Apr-03 17:56
sathyashrayan1-Apr-03 17:56 
GeneralRe: “EDIT” window and string storing Pin
Rickard Andersson201-Apr-03 22:57
Rickard Andersson201-Apr-03 22:57 
GeneralRe: “EDIT” window and string storing Pin
sathyashrayan2-Apr-03 1:19
sathyashrayan2-Apr-03 1:19 
GeneralRe: “EDIT” window and string storing Pin
John R. Shaw2-Apr-03 10:53
John R. Shaw2-Apr-03 10:53 
QuestionCoCreateInstance fail? Pin
Kevein1-Apr-03 17:49
Kevein1-Apr-03 17:49 
AnswerRe: CoCreateInstance fail? Pin
Dave Bryant1-Apr-03 18:12
Dave Bryant1-Apr-03 18:12 
AnswerRe: CoCreateInstance fail? Pin
Aisha Ikram1-Apr-03 19:48
Aisha Ikram1-Apr-03 19:48 
AnswerRe: CoCreateInstance fail? Pin
Kevein2-Apr-03 6:02
Kevein2-Apr-03 6:02 

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.