Re: Another Release Bugs...
Run the application on the problematic system while under a debugger.
I highly recommend Olly Debugger and SoftICE.
Kuphryn
Re: Another Release Bugs...
Quote:
Originally Posted by DjChris14
Hello guys! I have encountered another problem about releasing of exe files in Release mode. It works on my pc after i configure and compiled it so i think i will have no problem when distributing to another pc... after the compilation, i transfer the exe to another computer but the program doesnt work
What do you mean by "doesn't work"?
Quote:
... does anyone encountered this problem.
Yes. Every developer encounters this problem in some way or another. That's why most software has had bug fixes and new releases.
Regards,
Paul McKenzie
Re: Another Release Bugs...
Re: Another Release Bugs...
i already created the exe file under Win32 Release... the program starts to excute giving my login... to give everybody an overview of my connection, i put my _ConnectionPtr under my AppClass named m_pConnection which is being used in all connections of sub-programs... i traced the error here in my function AuditTrail which is also a member of the AppClass, here is the code where i found it...
void CBPLSAssessmentApp::AuditTrail(CString MCode, CString ATable, CString DObject)
{
CString sQuery,sCurrentDate;
COleDateTime m_vodtMonth,m_vodtDay,m_vodtYear,m_vodtSaveTime;
_RecordsetPtr pRSet = NULL ,pRights = NULL;
_CommandPtr pCmd = NULL;
try // CTS 02022004 add try and catch
{
pCmd.CreateInstance(__uuidof(Command));
pCmd->ActiveConnection = m_pConnection; // <---- this is the error in Win32 Release
sQuery = "insert into a_trail values ";
sQuery+="('"+ SetStrLength(sUser,10) +"',";
//m_vodtSaveTime = COleDateTime::GetCurrentTime();
m_vodtSaveTime.ParseDateTime(GetSystemDate());
sCurrentDate.Format("%04d-%02d-%02d %02d:%02d:%02d",
m_vodtSaveTime.GetYear(),
m_vodtSaveTime.GetMonth(),
m_vodtSaveTime.GetDay(),
m_vodtSaveTime.GetHour(),
m_vodtSaveTime.GetMinute(),
m_vodtSaveTime.GetSecond());
sQuery+=" '"+sCurrentDate +"',";
sQuery+=" '"+ SetStrLength(MCode,10) +"',";
sQuery+=" '"+ SetStrLength(ATable,30) +"',";
sQuery+=" '"+ SetStrLength(m_sComputerName,30) + "',"; // JJP 10112003 for Manila Workstation
sQuery+=" '"+ SetStrLength(DObject,200) +"')";
pCmd->CommandText = _bstr_t(sQuery);
pCmd->Execute(NULL, NULL, NULL);
}
catch (_com_error &e)
{
_bstr_t bstrDescription(e.Description());
MessageBox(NULL,LPCTSTR("CBPLSAssessmentApp:AuditTrail\n"+bstrDescription),APP_NAME,MB_OK);
exit(1);
} // CTS 02022004 add try and catch
}
so after the login session... the error is being catch but nothing is being written in the catch clause....
Re: Another Release Bugs...
to kuphryn: how can i use the SoftIce program? Im using VC++ 6.0... i found an analysis tool Gimpel Lint but i can't afford to buy it... is there any other tools that i can used to analyze my codes?
Re: Another Release Bugs...
is it possible that msado15.dll could be corrupted or something? i tried to compiled my program in another computer and transferred the released exe and it works very well... the only error that occur is the ActiveConnection of _CommandPtr if it is compiled in my computer... How can i overwrite msado15.dll? is there other files linked to msado15.dll or other component files related to it in relation to ado connections?
Re: Another Release Bugs...
Check out Olly Debugger.
Kuphryn
Re: Another Release Bugs...
what is the HRESULT returned from:
Code:
pCmd.CreateInstance(__uuidof(Command));
pCmd->ActiveConnection = m_pConnection; // <---- this is the error in Win32 Release
Re: Another Release Bugs...
To mick: how can i use the HRESULT command? how can i change it to CString so i can pop it as message box...
To Kuphryn : Im trying to use the Olly Debugger... hope i understand some of its instructions....
Re: Another Release Bugs...
Quote:
Originally Posted by DjChris14
To mick: how can i use the HRESULT command? how can i change it to CString so i can pop it as message box...
To Kuphryn : Im trying to use the Olly Debugger... hope i understand some of its instructions....
Assuming CreateInstance is the standard COM call, it returns an HRESULT. Check that. If it's not S_OK, then it will be some error value.
Viggy