need some OCL help
Posted: Tue 16 Sep 2008 07:28
I am using OCL library with Visual C++6. We are testing this program with 9i and 10g.
I noticed sometimes the server connection is disconnected, and even OCL function "isConnected()" is not reconized it.
this is the function that I have the problem.
BOOL CVDoc::UpdateMovPrograssive(LPCSTR strTelnumber, LPCSTR strGroupID, int nTotNum, int nFileNum, LPCSTR strFileName, LPCSTR strRTN, LPCSTR strAttr, LPCSTR strProgress)
{
if(!(m_Connection.isConnected()))
{
_WriteMessage(_WR_MSG_ERR_, _T("CVDoc::UpdateMovPrograssive : DB is Disconnected"));
return FALSE;
}
OraCommand cmd;
try
{
cmd.setConnection(m_Connection);
cmd.createProcCall(_T("UPDATE_MOVIE_DOWN_PROGRESS"));
cmd.param("in_telnumber").setChars(strTelnumber);
cmd.param("in_group_id").setChars(strGroupID);
cmd.param("in_total").setInt(nTotNum);
cmd.param("in_order").setInt(nFileNum);
cmd.param("in_filename").setChars(strFileName);
cmd.param("in_state").setChars(strAttr);
cmd.param("in_result").setChars(strRTN);
cmd.param("in_percent").setChars(strProgress);
cmd.execute();
}
catch (CRException& e)
{
CString strMessage = _T("CVDoc::UpdateMovPrograssive : ");
_WriteMessage(_WR_MSG_ERR_, strMessage + CString(e.message()));
return FALSE;
}
return TRUE;
}
since this program run, sometimes program is just sutdowned. even connection is failed is shouldn't happened.
Anyway. the message said. it is accessed the wrong memory point. it happend in OCL library.
It normaly working well. but sometimes, it failed, and I realzed that at that moment, the connection is not really connected. so It the procedure couldn't run.
My question is.
1) How can I realized that it is not connected. is "OraConnection::isConnected()" only way can get it?
2) Do you have any idea why it is happend? I am a beginner, I need experts helps...
I noticed sometimes the server connection is disconnected, and even OCL function "isConnected()" is not reconized it.
this is the function that I have the problem.
BOOL CVDoc::UpdateMovPrograssive(LPCSTR strTelnumber, LPCSTR strGroupID, int nTotNum, int nFileNum, LPCSTR strFileName, LPCSTR strRTN, LPCSTR strAttr, LPCSTR strProgress)
{
if(!(m_Connection.isConnected()))
{
_WriteMessage(_WR_MSG_ERR_, _T("CVDoc::UpdateMovPrograssive : DB is Disconnected"));
return FALSE;
}
OraCommand cmd;
try
{
cmd.setConnection(m_Connection);
cmd.createProcCall(_T("UPDATE_MOVIE_DOWN_PROGRESS"));
cmd.param("in_telnumber").setChars(strTelnumber);
cmd.param("in_group_id").setChars(strGroupID);
cmd.param("in_total").setInt(nTotNum);
cmd.param("in_order").setInt(nFileNum);
cmd.param("in_filename").setChars(strFileName);
cmd.param("in_state").setChars(strAttr);
cmd.param("in_result").setChars(strRTN);
cmd.param("in_percent").setChars(strProgress);
cmd.execute();
}
catch (CRException& e)
{
CString strMessage = _T("CVDoc::UpdateMovPrograssive : ");
_WriteMessage(_WR_MSG_ERR_, strMessage + CString(e.message()));
return FALSE;
}
return TRUE;
}
since this program run, sometimes program is just sutdowned. even connection is failed is shouldn't happened.
Anyway. the message said. it is accessed the wrong memory point. it happend in OCL library.
It normaly working well. but sometimes, it failed, and I realzed that at that moment, the connection is not really connected. so It the procedure couldn't run.
My question is.
1) How can I realized that it is not connected. is "OraConnection::isConnected()" only way can get it?
2) Do you have any idea why it is happend? I am a beginner, I need experts helps...