Search found 3 matches

by youngmin
Wed 17 Sep 2008 09:43
Forum: dbForge for Oracle
Topic: need some OCL help
Replies: 2
Views: 4793

I noticed the reason...

Our OCL version is 3.20.0.7 and we bought couple of month a go...

I realized that it is not the connection problem.

when it excuted a procedure, before finished the procedure, if I run same function, it means same procedure. it is crushed.
I traced the OCL function it has mutex, so i think, there is no reason for crushed the program.

If program dead with debugging meaasge, I would happy with it. but even debbuging mode, app program just shut downed without any message box.

I just debugged with file writing, and I found the reason.

when this function called before it finished the process, If I call again. it will happend
------------------------------------------------------------------------

BOOL CVDoc::UpdateECardPrograssive(LPCSTR strTelnumber, LPCSTR strGroupID, int nTotNum, int nFileNum, LPCSTR strFileName, LPCSTR strRTN, LPCSTR strAttr, LPCSTR strProgress)
{
CFunctionCkClass f(_T("CVDoc::UpdateECardPrograssive() : %s"));

if(!IsDBConnected())
{
_WriteMessage(_WR_MSG_ERR_, _T("CVDoc::UpdateE_CardPrograssive : DB 가 연결되어있지 않습니다."));
return FALSE;
}

OraCommand cmd;

try
{
cmd.setConnection(m_Connection);
cmd.createProcCall(_T("UPDATE_CARD_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::UpdateE_CardPrograssive : ");
_WriteMessage(_WR_MSG_ERR_, strMessage + CString(e.message()));

return FALSE;
}

return TRUE;
}

----------------------------





and this is the procedure
------------------------------------------------------------------------
create or replace procedure update_card_down_progress(in_telnumber VARCHAR2, in_group_id VARCHAR2,
in_total number, in_order number, in_filename varchar2,in_state VARCHAR2, in_result VARCHAR2, in_percent VARCHAR2)
IS
begin
if in_state = '1' then /* 정상 응답 */
begin
update tbl_deploy_card_current set dcc_deploy_progress = in_result, dcc_deploy_percent = in_percent
, dcc_deploy_end_date = to_char(sysdate, 'yyyymmddhh24mi')
where em_tel = in_telnumber and dcc_group_id = in_group_id and dcc_order = in_order;
end;
else
begin
update tbl_deploy_card_current set dcc_deploy_progress = in_result, dcc_deploy_percent = in_percent, dcc_deploy_error = in_state
, dcc_deploy_end_date = to_char(sysdate, 'yyyymmddhh24mi')
where em_tel = in_telnumber and dcc_group_id = in_group_id and dcc_order = in_order;
end;
end if;

/* 모든 전송이 완료 되었는지 검사한다. */
/*if in_result = '1' or in_result = '4' or in_result = '5' then
if in_total = in_order then */
/* 단말기이 현재 값을 group id 의 목록으로 변경한다. */
/*update_card_download(in_telnumber, in_group_id);
insert_card_down_completed(in_telnumber, in_group_id, in_order);
end if;
end if;*/
commit;
end;
--------------------
by youngmin
Wed 17 Sep 2008 06:28
Forum: dbForge for Oracle
Topic: Oracle Connection with OCL
Replies: 1
Views: 4377

Oracle Connection with OCL

I had questino yesterday, nobody answer about it... :(

Is anybody have used this library before?

I am using this, and I made connection member in my class.

OraConnection m_Connection;

this Connection is open when I connect DB and it is disconnected when program down.

ths problem is "m_Connection.isConnected()" seems not working well.

sometimes the program just shut downed. if it keep request SQL quary or excute procedures when DB is not responsed.

do I need to make connection in each function? it will be really slow for loading time...

so my question is..

1) is it any possible to know the connection is activate or not. even isConnected() say, it is working well...
2) Why the app progrm shutdowned when SQL qury statement or procedure is delayed too long.

2)
by youngmin
Tue 16 Sep 2008 07:28
Forum: dbForge for Oracle
Topic: need some OCL help
Replies: 2
Views: 4793

need some OCL help

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...