diff options
Diffstat (limited to 'cpp/demo/Database/Oracle/proc/EmpI.pc')
-rw-r--r-- | cpp/demo/Database/Oracle/proc/EmpI.pc | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/cpp/demo/Database/Oracle/proc/EmpI.pc b/cpp/demo/Database/Oracle/proc/EmpI.pc index e74887a939d..5506d0d0d84 100644 --- a/cpp/demo/Database/Oracle/proc/EmpI.pc +++ b/cpp/demo/Database/Oracle/proc/EmpI.pc @@ -17,7 +17,7 @@ EXEC SQL WHENEVER NOT FOUND DO handleNotFound(current, ctx); using namespace std; EmpI::EmpI(const CurrentSqlContext& currentCtx, - const string& empCategory, const string& deptCategory) : + const string& empCategory, const string& deptCategory) : _currentCtx(currentCtx), _empCategory(empCategory), _deptCategory(deptCategory) @@ -40,7 +40,7 @@ EmpI::ice_ping(const Ice::Current& current) const if(count == 0) { - throw Ice::ObjectNotExistException(__FILE__, __LINE__); + throw Ice::ObjectNotExistException(__FILE__, __LINE__); } } @@ -69,7 +69,7 @@ EmpI::getDesc(const Ice::Current& current) EXEC SQL CONTEXT USE :ctx; EXEC SQL SELECT ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO - INTO :ename:enameInd, :job:jobInd, :mgr:mgrInd, :hiredate:hiredateInd, :sal:salInd, :comm:commInd, + INTO :ename:enameInd, :job:jobInd, :mgr:mgrInd, :hiredate:hiredateInd, :sal:salInd, :comm:commInd, :deptno:deptnoInd FROM EMP WHERE EMPNO = :empno; EXEC SQL COMMIT; @@ -79,37 +79,37 @@ EmpI::getDesc(const Ice::Current& current) if(enameInd >= 0) { - result.ename = ename; + result.ename = ename; } if(jobInd >= 0) { - result.job = job; + result.job = job; } if(mgrInd >= 0) { - Ice::Identity mgrId; - mgrId.name = encodeName(mgr); - mgrId.category = _empCategory; - result.mgr = HR::EmpPrx::uncheckedCast(current.adapter->createProxy(mgrId)); + Ice::Identity mgrId; + mgrId.name = encodeName(mgr); + mgrId.category = _empCategory; + result.mgr = HR::EmpPrx::uncheckedCast(current.adapter->createProxy(mgrId)); } if(hiredateInd >= 0) { - result.hiredate = hiredate; + result.hiredate = hiredate; } if(salInd >= 0) { - result.sal = sal; + result.sal = sal; } if(commInd >= 0) { - result.comm = comm; + result.comm = comm; } if(deptnoInd >= 0) { - Ice::Identity deptId; - deptId.name = encodeName(deptno); - deptId.category = _deptCategory; - result.edept = HR::DeptPrx::uncheckedCast(current.adapter->createProxy(deptId)); + Ice::Identity deptId; + deptId.name = encodeName(deptno); + deptId.category = _deptCategory; + result.edept = HR::DeptPrx::uncheckedCast(current.adapter->createProxy(deptId)); } return result; } @@ -118,7 +118,7 @@ void EmpI::updateField(const string& field, const string& newValue, const Ice::Current& current) { const string updateEmpStr = - "UPDATE EMP SET " + field + " = '" + newValue + "' WHERE EMPNO = " + current.id.name; + "UPDATE EMP SET " + field + " = '" + newValue + "' WHERE EMPNO = " + current.id.name; sqlca sqlca; EXEC SQL BEGIN DECLARE SECTION; |