Click here to Skip to main content
15,893,266 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: S.M.A.R.T support in SCSI hard disk drive Pin
ipforce14-May-09 4:10
ipforce14-May-09 4:10 
GeneralRe: S.M.A.R.T support in SCSI hard disk drive Pin
aishui090515-Sep-09 17:13
aishui090515-Sep-09 17:13 
GeneralRe: S.M.A.R.T support in SCSI hard disk drive Pin
ipforce15-Sep-09 21:12
ipforce15-Sep-09 21:12 
GeneralRe: S.M.A.R.T support in SCSI hard disk drive Pin
aishui090518-Sep-09 19:12
aishui090518-Sep-09 19:12 
GeneralRe: S.M.A.R.T support in SCSI hard disk drive Pin
ipforce18-Sep-09 20:48
ipforce18-Sep-09 20:48 
Questionhelp me Create ISO image file from folders... Pin
lek25813-May-09 0:37
lek25813-May-09 0:37 
AnswerRe: help me Create ISO image file from folders... Pin
Rajesh R Subramanian13-May-09 1:21
professionalRajesh R Subramanian13-May-09 1:21 
QuestionLoading Resource from dll fails Pin
Super Hornet13-May-09 0:02
Super Hornet13-May-09 0:02 
AnswerRe: Loading Resource from dll fails Pin
«_Superman_»13-May-09 0:09
professional«_Superman_»13-May-09 0:09 
GeneralRe: Loading Resource from dll fails Pin
Super Hornet13-May-09 0:16
Super Hornet13-May-09 0:16 
GeneralRe: Loading Resource from dll fails Pin
«_Superman_»13-May-09 0:21
professional«_Superman_»13-May-09 0:21 
GeneralRe: Loading Resource from dll fails Pin
Super Hornet13-May-09 0:22
Super Hornet13-May-09 0:22 
GeneralRe: Loading Resource from dll fails Pin
Super Hornet13-May-09 0:29
Super Hornet13-May-09 0:29 
AnswerRe: Loading Resource from dll fails Pin
Super Hornet13-May-09 1:21
Super Hornet13-May-09 1:21 
AnswerRe: Loading Resource from dll fails Pin
Stuart Dootson13-May-09 0:10
professionalStuart Dootson13-May-09 0:10 
GeneralRe: Loading Resource from dll fails Pin
Super Hornet13-May-09 0:23
Super Hornet13-May-09 0:23 
QuestionNot able to connect to the database Pin
vital_parsley200012-May-09 23:34
vital_parsley200012-May-09 23:34 
I m doing a database application.

in my OnNewDocument() i have the following code..


HRESULT hr;
try
{
AfxMessageBox("Inside try executed.",NULL,MB_OK); //Excecuted
hr = m_pConnection.CreateInstance(__uuidof(Connection));
AfxMessageBox("Created instance executed.",NULL,MB_OK);
if(SUCCEEDED(hr))
{
AfxMessageBox("If hr succeeded.",NULL,MB_OK);//Not Executed
hr = m_pConnection->Open(_bstr_t(L"Provider=sqloledb;Data Source=C:\\Program Files\\Microsoft SQL Server\\MSSQL\\Data\\LibDB.mdf;"),_bstr_t(L""),_bstr_t(L""),adModeUnknown);
if(SUCCEEDED(hr))
{
AfxMessageBox("Open connection executed.",NULL,MB_OK); //not executed
m_pConnection=TRUE;
}
}
AfxMessageBox("out",NULL,MB_OK);
}
catch(_com_error &e)
{
_bstr_t bstrSource(e.Source());
_bstr_t bstrDescription(e.Description());
TRACE( "Exception thrown for classes generated by #import" );
TRACE( "\tCode = %08lx\n", e.Error());
TRACE( "\tCode meaning = %s\n", e.ErrorMessage());
TRACE( "\tSource = %s\n", (LPCTSTR) bstrSource);
TRACE( "\tDescription = %s\n", (LPCTSTR) bstrDescription);
}
catch(...)
{
TRACE( "*** Unhandled Exception ***" );
}
return TRUE;
}

In the above code the if(SUCCEEDED(hr)) block is not executed.What could be the reason ?
AnswerRe: Not able to connect to the database Pin
CPallini12-May-09 23:40
mveCPallini12-May-09 23:40 
AnswerRe: Not able to connect to the database Pin
Madhu Nair12-May-09 23:44
Madhu Nair12-May-09 23:44 
GeneralRe: Not able to connect to the database Pin
vital_parsley200013-May-09 4:19
vital_parsley200013-May-09 4:19 
AnswerRe: Not able to connect to the database Pin
Madhu Nair13-May-09 19:45
Madhu Nair13-May-09 19:45 
AnswerRe: Not able to connect to the database [modified] Pin
Madhu Nair13-May-09 20:03
Madhu Nair13-May-09 20:03 
AnswerRe: Not able to connect to the database Pin
David Crow13-May-09 3:17
David Crow13-May-09 3:17 
QuestionLoad data from database to BCG grid Pin
MrKBA12-May-09 21:56
MrKBA12-May-09 21:56 
AnswerRe: Load data from database to BCG grid Pin
Madhu Nair12-May-09 22:14
Madhu Nair12-May-09 22:14 

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.