Click here to Skip to main content
15,920,801 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionmy method to optimize application startup performance Pin
George_George21-Nov-07 20:39
George_George21-Nov-07 20:39 
AnswerRe: my method to optimize application startup performance Pin
jhwurmbach21-Nov-07 21:11
jhwurmbach21-Nov-07 21:11 
GeneralRe: my method to optimize application startup performance Pin
George_George21-Nov-07 21:23
George_George21-Nov-07 21:23 
GeneralRe: my method to optimize application startup performance Pin
jhwurmbach21-Nov-07 21:41
jhwurmbach21-Nov-07 21:41 
QuestionCDatabase's ExecuteQuery Pin
prithaa21-Nov-07 20:19
prithaa21-Nov-07 20:19 
AnswerRe: CDatabase's ExecuteQuery Pin
Gofur Halmurat22-Nov-07 1:48
Gofur Halmurat22-Nov-07 1:48 
GeneralRe: CDatabase's ExecuteQuery Pin
prithaa22-Nov-07 20:28
prithaa22-Nov-07 20:28 
GeneralRe: CDatabase's ExecuteQuery Pin
Gofur Halmurat23-Nov-07 2:46
Gofur Halmurat23-Nov-07 2:46 
Hi, i am sending these types:
<br />
_ConnectionPtr m_pConn;<br />
_RecordsetPtr pRecordset;<br />
_CommandPtr pCommand;<br />
<br />
these code helps you to understand:<br />
	<br />
<br />
void  cReadText::ConnectionAdo()  	<br />
{<br />
	bConnected = true;<br />
<br />
	try	<br />
	{<br />
		HRESULT hr = m_pConn.CreateInstance (__uuidof (Connection));<br />
<br />
		if (FAILED (hr))<br />
		{<br />
			AfxMessageBox ("Can't create intance of Connection");<br />
		}<br />
		if (FAILED (m_pConn->Open (_bstr_t("Provider=Microsoft.Jet.OLEDB.4.0;Data Source = <big>EmailReminder.mdb</big>;"),<br />
					_bstr_t (""), _bstr_t (""), adModeUnknown)))<br />
		{<br />
			AfxMessageBox ("Can't open datasource");<br />
		}		<br />
	}<br />
	catch( _com_error &e )<br />
	{<br />
		_bstr_t bstrSource(e.Source());<br />
		_bstr_t bstrDescription(e.Description());<br />
		TRACE( "Exception thrown for classes generated by #import" );<br />
		TRACE( "\tCode = %08lx\n", e.Error());<br />
		TRACE( "\tCode meaning = %s\n", e.ErrorMessage());<br />
		TRACE( "\tSource = %s\n", (LPCTSTR) bstrSource);<br />
		TRACE( "\tDescription = %s\n", (LPCTSTR) bstrDescription);<br />
		AfxMessageBox ((LPCTSTR) bstrDescription);<br />
		AfxMessageBox ((LPCTSTR) e.Source());<br />
		<br />
<br />
		bConnected = false;<br />
<br />
	}<br />
	catch (...)<br />
	{<br />
		bConnected = false;<br />
	}<br />
	<br />
<br />
}<br />
<br />
void cReadText::RunCammand(_bstr_t SQL)<br />
{<br />
<br />
	m_pConn->Execute(SQL,NULL,adExecuteNoRecords);<br />
	<br />
}<br />
<br />
_RecordsetPtr cReadText::GetRecordset(_bstr_t SQL)<br />
{<br />
	<br />
	pCommand.CreateInstance (__uuidof (Command));<br />
	pCommand->ActiveConnection = m_pConn; <br />
	pCommand->CommandText = SQL;		<br />
	pRecordset.CreateInstance (__uuidof (Recordset));<br />
	pRecordset->CursorLocation = adUseClient;<br />
	pRecordset->Open ( (IDispatch *) pCommand, vtMissing, adOpenStatic,adLockBatchOptimistic, adCmdUnknown);<br />
	return pRecordset;<br />
<br />
}<br />
<br />

QuestionProblem while Running the Application in Release Configuration Pin
ss43121-Nov-07 20:15
ss43121-Nov-07 20:15 
AnswerRe: Problem while Running the Application in Release Configuration Pin
Cedric Moonen21-Nov-07 20:29
Cedric Moonen21-Nov-07 20:29 
AnswerRe: Problem while Running the Application in Release Configuration Pin
only coder21-Nov-07 20:38
only coder21-Nov-07 20:38 
Questionproblem retrieving service failure action Pin
nitin321-Nov-07 19:51
nitin321-Nov-07 19:51 
QuestionIntercepting media stream from a running application Pin
Reena Nair21-Nov-07 19:31
Reena Nair21-Nov-07 19:31 
AnswerRe: Intercepting media stream from a running application Pin
Mark Salsbery22-Nov-07 7:16
Mark Salsbery22-Nov-07 7:16 
QuestionRegistering files with application Pin
nbugalia21-Nov-07 19:27
nbugalia21-Nov-07 19:27 
Questionstruck with OnPaint Pin
kk.tvm21-Nov-07 17:47
kk.tvm21-Nov-07 17:47 
AnswerRe: struck with OnPaint Pin
manish.patel21-Nov-07 18:15
manish.patel21-Nov-07 18:15 
AnswerRe: struck with OnPaint Pin
manish.patel21-Nov-07 18:18
manish.patel21-Nov-07 18:18 
AnswerRe: struck with OnPaint Pin
Hamid_RT21-Nov-07 18:53
Hamid_RT21-Nov-07 18:53 
GeneralRe: struck with OnPaint Pin
kk.tvm21-Nov-07 19:09
kk.tvm21-Nov-07 19:09 
GeneralRe: struck with OnPaint Pin
manish.patel21-Nov-07 19:17
manish.patel21-Nov-07 19:17 
GeneralRe: struck with OnPaint Pin
manish.patel21-Nov-07 19:20
manish.patel21-Nov-07 19:20 
GeneralRe: struck with OnPaint Pin
Hamid_RT21-Nov-07 19:24
Hamid_RT21-Nov-07 19:24 
GeneralRe: struck with OnPaint Pin
manish.patel21-Nov-07 19:38
manish.patel21-Nov-07 19:38 
GeneralRe: struck with OnPaint Pin
Hamid_RT21-Nov-07 20:19
Hamid_RT21-Nov-07 20:19 

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.