diff options
author | Matthew Newhook <matthew@zeroc.com> | 2015-03-18 12:58:16 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2015-03-18 12:58:16 -0230 |
commit | 9b7668c7c92cf9cb311fe444cdddb489cd2a219d (patch) | |
tree | 5016567c58c81f5654e9d01935e199c6bf4761d2 /cpp/demo/Database/Oracle/occi | |
parent | VS add-in & build updates: (diff) | |
download | ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.bz2 ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.xz ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.zip |
Removed demos.
Moved demoscript to distribution.
Diffstat (limited to 'cpp/demo/Database/Oracle/occi')
24 files changed, 0 insertions, 2653 deletions
diff --git a/cpp/demo/Database/Oracle/occi/.gitignore b/cpp/demo/Database/Oracle/occi/.gitignore deleted file mode 100644 index ced083309b6..00000000000 --- a/cpp/demo/Database/Oracle/occi/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -// Generated by makegitignore.py - -// IMPORTANT: Do not edit this file -- any edits made here will be lost! -client -server -HR.cpp -HR.h -DbTypes.h -DbTypes.cpp -DbTypesMap.h -DbTypesMap.cpp -DbTypesOut.typ diff --git a/cpp/demo/Database/Oracle/occi/Client.cpp b/cpp/demo/Database/Oracle/occi/Client.cpp deleted file mode 100644 index e1bf101fd2e..00000000000 --- a/cpp/demo/Database/Oracle/occi/Client.cpp +++ /dev/null @@ -1,559 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/Ice.h> -#include <HR.h> -#include <iostream> -#include <limits> - -using namespace std; -using namespace HR; - -class HRClient : public Ice::Application -{ -public: - HRClient(); - - virtual int run(int, char*[]); - - enum Menu {rootMenu, empMenu, deptMenu}; - -private: - - void help() const; - bool checkCin(const string& command) const; - void checkEof(const string& command) const; - void invalidCommand(const string& command) const; - - void doRootMenu(const string&) const; - void doDeptMenu(const string&) const; - void doEmpMenu(const string&) const; - - void printDepts(const DeptPrxSeq&) const; - void printEmps(const EmpPrxSeq&) const; - - static string quote(const string&); - static string unquote(const string&); - - Menu _currentMenu; - DeptFactoryPrx _factory; - DeptPrx _currentDept; - EmpPrx _currentEmp; - - string _commonCommands; - string _rootCommands; - string _deptCommands; - string _empCommands; -}; - -int -main(int argc, char* argv[]) -{ - HRClient app; - return app.main(argc, argv, "config.client"); -} - -HRClient::HRClient() : - _currentMenu(rootMenu) -{ - _commonCommands = - "dept <number>: set department <number> as the current department\n" - "emp <number>: set employee <number> as the current employee\n" - "exit or quit: exit client\n" - "help: print this list of commands\n" - "root: go back to the root menu\n"; - - _rootCommands = - "create: create a new department\n" - "find <name>: find the department(s) with the given name\n" - "list: list all departments\n"; - - - _deptCommands = - "create: create a new employee in this department\n" - "find <name>: find employee(s) named <name> in this department\n" - "list: list all employees in this department\n" - "ping: ping this department\n" - "remove: remove this department\n" - "show: describe this department\n" - "update <dname|loc> <new value>: update this department\n"; - - _empCommands = - "ping: ping this employee\n" - "remove: remove this employee\n" - "show: describe this employee\n" - "update <ename|job|mgr|hiredate|sal|comm|dept> <new-value>: update this employee\n"; -} - -void -HRClient::checkEof(const string& command) const -{ - if(!cin.eof()) - { - string extra; - getline(cin, extra); - if(extra.size() > 0) - { - cout << "Warning: ignoring extra args '" << extra - << "' for '" << command << "'" << endl; - } - } -} - -bool -HRClient::checkCin(const string& command) const -{ - if(!cin) - { - cout << "Error: failed to read arguments for '" << command << "'" << endl; - cin.clear(); - cin.ignore(numeric_limits<streamsize>::max(), '\n'); - return false; - } - checkEof(command); - return true; -} - -void -HRClient::invalidCommand(const string& command) const -{ - cout << "Invalid command '" << command << "'. " - "Type 'help' for help." << endl; - cin.ignore(numeric_limits<streamsize>::max(), '\n'); -} - -void -HRClient::help() const -{ - cout << "Commands are:\n"; - cout << "--- Specific to this menu ---\n"; - - switch(_currentMenu) - { - case rootMenu: - { - cout << _rootCommands; - break; - } - case deptMenu: - { - cout << _deptCommands; - break; - } - case empMenu: - { - cout << _empCommands; - break; - } - } - cout << "--- Common to all menus ---\n"; - cout << _commonCommands << endl; -} - -int -HRClient::run(int argc, char* argv[]) -{ - if(argc > 1) - { - cerr << appName() << ": too many arguments" << endl; - return EXIT_FAILURE; - } - - Ice::ObjectPrx base = communicator()->propertyToProxy("HR.DeptFactory"); - _factory = DeptFactoryPrx::checkedCast(base); - if(_factory == 0) - { - cerr << argv[0] << ": invalid proxy" << endl; - return EXIT_FAILURE; - } - - Ice::EndpointSeq endpoints = _factory->ice_getEndpoints(); - - - // - // cin loop - // - - string command; - - do - { - cout << "==> "; - cin >> command; - - if(!cin) - { - break; - } - - try - { - - // - // Common commands - // - if(command == "dept") - { - int deptno; - cin >> deptno; - if(checkCin(command)) - { - _currentDept = DeptPrx::uncheckedCast(_factory->findDeptByNo(deptno)); - if(_currentDept != 0) - { - _currentMenu = deptMenu; - } - else - { - cout << "There is no department with deptno " << deptno << endl; - } - } - } - else if(command == "emp") - { - int empno; - cin >> empno; - if(checkCin(command)) - { - _currentEmp = EmpPrx::uncheckedCast(_factory->findEmpByNo(empno)); - if(_currentEmp != 0) - { - _currentMenu = empMenu; - } - else - { - cout << "There is no employee with empno " << empno << endl; - } - } - } - else if(command == "exit" || command == "quit") - { - checkEof(command); - break; - } - else if(command == "help") - { - checkEof(command); - help(); - } - else if(command == "root") - { - checkEof(command); - _currentMenu = rootMenu; - } - else if(_currentMenu == rootMenu) - { - doRootMenu(command); - } - else if(_currentMenu == deptMenu) - { - doDeptMenu(command); - } - else if(_currentMenu == empMenu) - { - doEmpMenu(command); - } - else - { - assert(0); - } - } - catch(const SqlException& e) - { - cout << "Caught a SqlException: " << e.reason << endl; - } - catch(const IceUtil::Exception& e) - { - cout << "Caught an Ice exception: " << e << endl; - } - catch(const std::exception& e) - { - cout << "Caught a std::exception: " << e.what() << endl; - } - catch(...) - { - cout << "Caught an unknown exception" << endl; - } - } - while(cin.good()); - - return EXIT_SUCCESS; -} - -void -HRClient::doRootMenu(const string& command) const -{ - if(command == "create") - { - checkEof(command); - cout << "Please enter: deptno dname loc ==> "; - int deptno; - DeptDesc desc; - cin >> deptno >> desc.dname >> desc.loc; - - desc.dname = unquote(desc.dname); - desc.loc = unquote(desc.loc); - - if(checkCin("create parameters")) - { - _factory->createDept(deptno, desc); - cout << "Created new department number " << deptno << endl; - } - } - else if(command == "find") - { - string name; - cin >> name; - if(checkCin(command)) - { - printDepts(_factory->findByName(name)); - } - } - else if(command == "list") - { - checkEof(command); - printDepts(_factory->findAll()); - } - else - { - invalidCommand(command); - } -} - -void -HRClient::doDeptMenu(const string& command) const -{ - if(command == "create") - { - checkEof(command); - cout << "Please enter: empno ename job mgr(empno) hiredate sal comm ==> "; - int empno; - int mgrEmpno; - EmpDesc desc; - cin >> empno >> desc.ename >> desc.job >> mgrEmpno >> desc.hiredate >> desc.sal >> desc.comm; - - desc.ename = unquote(desc.ename); - desc.job = unquote(desc.job); - - if(mgrEmpno != 0) - { - desc.mgr = _factory->findEmpByNo(mgrEmpno); - if(desc.mgr == 0) - { - cout << "Manager #" << mgrEmpno << " does not exist: clearing manager" << endl; - } - } - desc.hiredate = unquote(desc.hiredate); - desc.sal = unquote(desc.sal); - desc.comm = unquote(desc.comm); - - desc.edept = _currentDept; - - if(checkCin("create parameters")) - { - _currentDept->createEmp(empno, desc); - cout << "Created new employee number " << empno << endl; - } - } - else if(command == "find") - { - string name; - cin >> name; - if(checkCin(command)) - { - printEmps(_currentDept->findByName(name)); - } - } - else if(command == "list") - { - checkEof(command); - printEmps(_currentDept->findAll()); - } - else if(command == "ping") - { - checkEof(command); - _currentDept->ice_ping(); - cout << "ice_ping: success!" << endl; - } - else if(command == "remove") - { - checkEof(command); - _currentDept->remove(); - } - else if(command == "show") - { - checkEof(command); - DeptDesc desc = _currentDept->getDesc(); - cout << "deptno: " << desc.deptno << endl; - cout << "dname: " << quote(desc.dname) << endl; - cout << "loc: " << quote(desc.loc) << endl; - } - else if(command == "update") - { - string field; - string newValue; - cin >> field >> newValue; - newValue = unquote(newValue); - - if(checkCin("update " + field)) - { - _currentDept->updateField(field, newValue); - } - } - else - { - invalidCommand(command); - } -} - -void -HRClient::doEmpMenu(const string& command) const -{ - if(command == "ping") - { - checkEof(command); - _currentEmp->ice_ping(); - cout << "ice_ping: success!" << endl; - } - else if(command == "remove") - { - checkEof(command); - _currentEmp->remove(); - } - else if(command == "show") - { - checkEof(command); - EmpDesc desc = _currentEmp->getDesc(); - cout << "empno: " << desc.empno << endl; - cout << "ename: " << quote(desc.ename) << endl; - cout << "job: " << quote(desc.job) << endl; - cout << "mgr: "; - if(desc.mgr == 0) - { - cout << "<null>" << endl; - } - else - { - cout << desc.mgr->getDesc().empno << endl; - } - cout << "hiredate: " << quote(desc.hiredate) << endl; - cout << "sal: " << quote(desc.sal) << endl; - cout << "comm: " << quote(desc.comm) << endl; - cout << "dept: "; - if(desc.edept == 0) - { - cout << "<null>" << endl; - } - else - { - cout << desc.edept->getDesc().deptno << endl; - } - } - else if(command == "update") - { - string field; - cin >> field; - if(field == "mgr") - { - int mgr; - cin >> mgr; - if(checkCin("update mgr")) - { - _currentEmp->updateMgr(mgr); - } - } - else if(field == "dept") - { - int deptno; - cin >> deptno; - if(checkCin("update dept")) - { - _currentEmp->updateDept(deptno); - } - } - else - { - string newValue; - cin >> newValue; - newValue = unquote(newValue); - if(checkCin("update " + field)) - { - _currentEmp->updateField(field, newValue); - } - } - } - else - { - invalidCommand(command); - } -} - -void -HRClient::printDepts(const DeptPrxSeq& depts) const -{ - cout << "Deptno\t Dname\t Loc" << endl; - if(depts.size() == 0) - { - cout << "<None found>" << endl; - } - else - { - for(DeptPrxSeq::const_iterator p = depts.begin(); p != depts.end(); ++p) - { - HR::DeptDesc desc = (*p)->getDesc(); - cout << desc.deptno << "\t " << desc.dname << "\t " << desc.loc << endl; - } - } -} - -void -HRClient::printEmps(const EmpPrxSeq& emps) const -{ - cout << "Empno\t Ename" << endl; - if(emps.size() == 0) - { - cout << "<None found>" << endl; - } - else - { - for(EmpPrxSeq::const_iterator p = emps.begin(); p != emps.end(); ++p) - { - HR::EmpDesc desc = (*p)->getDesc(); - cout << desc.empno << "\t " << desc.ename << endl; - } - } -} - - -/*static*/ string -HRClient::quote(const string& str) -{ - if(str == "") - { - return "''"; - } - else - { - return str; - } - -} - -/*static*/ string -HRClient::unquote(const string& str) -{ - if(str == "''") - { - return ""; - } - else - { - return str; - } -} diff --git a/cpp/demo/Database/Oracle/occi/DbTypes.typ b/cpp/demo/Database/Oracle/occi/DbTypes.typ deleted file mode 100755 index 294d17a5c2e..00000000000 --- a/cpp/demo/Database/Oracle/occi/DbTypes.typ +++ /dev/null @@ -1,16 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -# -# This copy of Ice is licensed to you under the terms described in the -# ICE_LICENSE file included in this distribution. -# -# ********************************************************************** -# -# Compile with: -# ott userid=scott/tiger@orcl code=cpp hfile=DbTypes.h cppfile=DbTypes.cpp -# mapfile=DbTypesMap.cpp intype=DbTypes.typ outtype=DbTypesOut.typ -# attraccess=private -# -TYPE DEPT_T -TYPE EMP_T diff --git a/cpp/demo/Database/Oracle/occi/DeptFactoryI.cpp b/cpp/demo/Database/Oracle/occi/DeptFactoryI.cpp deleted file mode 100644 index bd9284e8780..00000000000 --- a/cpp/demo/Database/Oracle/occi/DeptFactoryI.cpp +++ /dev/null @@ -1,169 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/Ice.h> -#include <DeptFactoryI.h> -#include <Util.h> -#include <DbTypes.h> - -#ifdef _MSC_VER -// -// ott generates placement new without the corresponding delete -// -# pragma warning( 4 : 4291 ) -#endif - -using namespace std; -using namespace oracle::occi; - -DeptFactoryI::DeptFactoryI(Environment* env, StatelessConnectionPool* pool, - const string& category) : - _env(env), - _pool(pool), - _category(category) -{ -} - -HR::DeptPrx -DeptFactoryI::createDept(int deptno, const HR::DeptDesc& desc, const Ice::Current& current) -{ - ConnectionHolderPtr conh = new ConnectionHolder(_pool); - - // - // Inserted into the OCCI cache - // - DEPT_T* dept = new(conh->connection(), "DEPT_VIEW")DEPT_T; - dept->setDeptno(deptno); - dept->setDname(desc.dname); - dept->setLoc(desc.loc); - - Ice::Identity deptId; - deptId.category = _category; - deptId.name = encodeRef(dept->getRef(), _env); - conh->commit(); - - return HR::DeptPrx::uncheckedCast(current.adapter->createProxy(deptId)); -} - -HR::DeptPrxSeq -DeptFactoryI::findAll(const Ice::Current& current) -{ - HR::DeptPrxSeq result; - - ConnectionHolderPtr conh = new ConnectionHolder(_pool); - { - StatementHolder stmth(conh); - - auto_ptr<ResultSet> rs(stmth.statement()->executeQuery("SELECT REF(d) FROM DEPT_VIEW d")); - - while(rs->next() != ResultSet::END_OF_FETCH) - { - Ice::Identity deptId; - deptId.category = _category; - deptId.name = encodeRef(rs->getRef(1), _env); - - result.push_back(HR::DeptPrx::uncheckedCast(current.adapter->createProxy(deptId))); - } - } - conh->commit(); - return result; -} - - -HR::DeptPrxSeq -DeptFactoryI::findByName(const string& name, const Ice::Current& current) -{ - HR::DeptPrxSeq result; - ConnectionHolderPtr conh = new ConnectionHolder(_pool); - { - StatementHolder stmth(conh); - stmth.statement()->setSQL("SELECT REF(d) FROM DEPT_VIEW d WHERE DNAME = :1"); - stmth.statement()->setString(1, name); - - auto_ptr<ResultSet> rs(stmth.statement()->executeQuery()); - - while(rs->next() != ResultSet::END_OF_FETCH) - { - Ice::Identity deptId; - deptId.category = _category; - deptId.name = encodeRef(rs->getRef(1), _env); - - result.push_back(HR::DeptPrx::uncheckedCast(current.adapter->createProxy(deptId))); - } - } - conh->commit(); - return result; -} - -HR::DeptPrx -DeptFactoryI::findDeptByNo(int deptno, const Ice::Current& current) -{ - HR::DeptPrx result; - - ConnectionHolderPtr conh = new ConnectionHolder(_pool); - Ref<DEPT_T> ref = findDeptRefByNo(deptno, conh->connection()); - - if(!ref.isNull()) - { - Ice::Identity deptId; - deptId.category = _category; - deptId.name = encodeRef(ref, _env); - result = HR::DeptPrx::uncheckedCast(current.adapter->createProxy(deptId)); - } - conh->commit(); - return result; -} - -HR::EmpPrx -DeptFactoryI::findEmpByNo(int empno, const Ice::Current& current) -{ - HR::EmpPrx result; - ConnectionHolderPtr conh = new ConnectionHolder(_pool); - Ref<EMP_T> ref = findEmpRefByNo(empno, conh->connection()); - - if(!ref.isNull()) - { - Ice::Identity empId; - empId.category = _category; - empId.name = encodeRef(ref, _env); - result = HR::EmpPrx::uncheckedCast(current.adapter->createProxy(empId)); - } - conh->commit(); - return result; -} - -Ref<DEPT_T> -DeptFactoryI::findDeptRefByNo(int deptno, Connection* con) const -{ - StatementHolder stmth(con); - stmth.statement()->setSQL("SELECT REF(d) FROM DEPT_VIEW d WHERE DEPTNO = :1"); - stmth.statement()->setInt(1, deptno); - auto_ptr<ResultSet> rs(stmth.statement()->executeQuery()); - - if(rs->next() == ResultSet::END_OF_FETCH) - { - return Ref<DEPT_T>(); - } - return rs->getRef(1); -} - -Ref<EMP_T> -DeptFactoryI::findEmpRefByNo(int empno, Connection* con) const -{ - StatementHolder stmth(con); - stmth.statement()->setSQL("SELECT REF(e) FROM EMP_VIEW e WHERE EMPNO = :1"); - stmth.statement()->setInt(1, empno); - auto_ptr<ResultSet> rs(stmth.statement()->executeQuery()); - - if(rs->next() == ResultSet::END_OF_FETCH) - { - return Ref<EMP_T>(); - } - return rs->getRef(1); -} diff --git a/cpp/demo/Database/Oracle/occi/DeptFactoryI.h b/cpp/demo/Database/Oracle/occi/DeptFactoryI.h deleted file mode 100644 index cc4242adf7d..00000000000 --- a/cpp/demo/Database/Oracle/occi/DeptFactoryI.h +++ /dev/null @@ -1,58 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef DEPT_FACTORYI_H -#define DEPT_FACTORYI_H - -#include <HR.h> -#include <occi.h> -#include <DbTypes.h> - -class DeptFactoryI : public HR::DeptFactory -{ -public: - - DeptFactoryI(oracle::occi::Environment* env, oracle::occi::StatelessConnectionPool*, - const std::string&); - - virtual HR::DeptPrx createDept(int, const HR::DeptDesc&, const Ice::Current&); - - virtual HR::DeptPrxSeq findAll(const Ice::Current&); - virtual HR::DeptPrxSeq findByName(const std::string&, const Ice::Current&); - - virtual HR::DeptPrx findDeptByNo(int, const Ice::Current&); - virtual HR::EmpPrx findEmpByNo(int, const Ice::Current&); - - oracle::occi::Ref<DEPT_T> findDeptRefByNo(int, oracle::occi::Connection*) const; - oracle::occi::Ref<EMP_T> findEmpRefByNo(int, oracle::occi::Connection*) const; - - oracle::occi::Environment* getEnv() const - { - return _env; - } - - oracle::occi::StatelessConnectionPool* getConnectionPool() const - { - return _pool; - } - - const std::string& getCategory() const - { - return _category; - } - -private: - oracle::occi::Environment* _env; - oracle::occi::StatelessConnectionPool* _pool; - const std::string _category; -}; - -typedef IceUtil::Handle<DeptFactoryI> DeptFactoryIPtr; - -#endif diff --git a/cpp/demo/Database/Oracle/occi/DeptI.cpp b/cpp/demo/Database/Oracle/occi/DeptI.cpp deleted file mode 100644 index c4c43d884c3..00000000000 --- a/cpp/demo/Database/Oracle/occi/DeptI.cpp +++ /dev/null @@ -1,169 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <DeptI.h> - -#ifdef _MSC_VER -// -// ott generates placement new without the corresponding delete -// -# pragma warning( 4 : 4291 ) -#endif - -using namespace std; -using namespace oracle::occi; - -DeptI::DeptI(const RefAny& ref, const ConnectionHolderPtr& conh, const DeptFactoryIPtr& factory) : - _ref(ref), _conh(conh), _factory(factory) -{ -} - - -HR::EmpPrx -DeptI::createEmp(int empno, const HR::EmpDesc& desc, const Ice::Current& current) -{ - Environment* env = _factory->getEnv(); - - // - // Inserted into the OCCI cache - // - EMP_T* emp = new(_conh->connection(), "EMP_VIEW")EMP_T; - - emp->setEmpno(empno); - emp->setEname(desc.ename); - emp->setJob(desc.job); - if(desc.mgr != 0) - { - Ref<EMP_T> mgrRef = decodeRef(desc.mgr->ice_getIdentity().name, env, _conh->connection()); - - emp->setMgrref(mgrRef); - } - - if(desc.hiredate != "") - { - Date hiredate(env); - hiredate.fromText(desc.hiredate); - emp->setHiredate(hiredate); - } - - if(desc.sal != "") - { - Number sal(0); - sal.fromText(env, desc.sal, "99999.99"); - emp->setSal(sal); - } - - if(desc.comm != "") - { - Number comm(0); - comm.fromText(env, desc.comm, "0.999"); - emp->setComm(comm); - } - - emp->setDeptref(_ref); - - Ice::Identity empId; - empId.category = _factory->getCategory(); - empId.name = encodeRef(emp->getRef(), env); - _conh->commit(); - return HR::EmpPrx::uncheckedCast(current.adapter->createProxy(empId)); -} - -HR::DeptDesc -DeptI::getDesc(const Ice::Current& current) -{ - HR::DeptDesc result; - - Ref<DEPT_T> deptRef = decodeRef(current.id.name, _factory->getEnv(), _conh->connection()); - result.deptno = deptRef->getDeptno(); - result.dname = deptRef->getDname(); - result.loc = deptRef->getLoc(); - - _conh->commit(); - return result; -} - -void -DeptI::updateField(const string& field, const string& newValue, const Ice::Current& current) -{ - Ref<DEPT_T> deptRef = decodeRef(current.id.name, _factory->getEnv(), _conh->connection()); - - if(field == "dname") - { - deptRef->setDname(newValue); - } - else if(field == "loc") - { - deptRef->setLoc(newValue); - } - else - { - throw HR::SqlException("There is no field " + field + " in object DEPT_T"); - } - deptRef->markModified(); - _conh->commit(); -} - -void -DeptI::remove(const Ice::Current& current) -{ - Ref<DEPT_T> deptRef = decodeRef(current.id.name, _factory->getEnv(), _conh->connection()); - deptRef->markDelete(); - _conh->commit(); -} - -HR::EmpPrxSeq -DeptI::findAll(const Ice::Current& current) -{ - HR::EmpPrxSeq result; - { - Ref<DEPT_T> deptRef = decodeRef(current.id.name, _factory->getEnv(), _conh->connection()); - - StatementHolder stmth(_conh); - stmth.statement()->setSQL("SELECT REF(e) FROM EMP_VIEW e WHERE DEPTREF = :1"); - stmth.statement()->setRef(1, deptRef); - auto_ptr<ResultSet> rs(stmth.statement()->executeQuery()); - - while(rs->next() != ResultSet::END_OF_FETCH) - { - Ice::Identity empId; - empId.category = _factory->getCategory(); - empId.name = encodeRef(rs->getRef(1), _factory->getEnv()); - result.push_back(HR::EmpPrx::uncheckedCast(current.adapter->createProxy(empId))); - } - } - _conh->commit(); - return result; -} - -HR::EmpPrxSeq -DeptI::findByName(const string& name, const Ice::Current& current) -{ - HR::EmpPrxSeq result; - { - Ref<DEPT_T> deptRef = decodeRef(current.id.name, _factory->getEnv(), _conh->connection()); - - StatementHolder stmth(_conh); - stmth.statement()->setSQL("SELECT REF(e) FROM EMP_VIEW e WHERE DEPTREF = :1 AND ENAME = :2"); - stmth.statement()->setRef(1, deptRef); - stmth.statement()->setString(2, name); - auto_ptr<ResultSet> rs(stmth.statement()->executeQuery()); - - while(rs->next() != ResultSet::END_OF_FETCH) - { - Ice::Identity empId; - empId.category = _factory->getCategory(); - empId.name = encodeRef(rs->getRef(1), _factory->getEnv()); - - result.push_back(HR::EmpPrx::uncheckedCast(current.adapter->createProxy(empId))); - } - } - _conh->commit(); - return result; -} diff --git a/cpp/demo/Database/Oracle/occi/DeptI.h b/cpp/demo/Database/Oracle/occi/DeptI.h deleted file mode 100644 index 60034433cdc..00000000000 --- a/cpp/demo/Database/Oracle/occi/DeptI.h +++ /dev/null @@ -1,42 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef DEPTI_H -#define DEPTI_H - -#include <Ice/Ice.h> -#include <DeptFactoryI.h> -#include <HR.h> -#include <occi.h> -#include <DbTypes.h> -#include <Util.h> - -class DeptI : public HR::Dept -{ -public: - - DeptI(const oracle::occi::RefAny&, const ConnectionHolderPtr&, const DeptFactoryIPtr&); - - virtual HR::EmpPrx createEmp(int, const HR::EmpDesc&, const Ice::Current&); - - virtual HR::DeptDesc getDesc(const Ice::Current&); - virtual void updateField(const std::string&, const std::string&, const Ice::Current&); - virtual void remove(const Ice::Current&); - - virtual HR::EmpPrxSeq findAll(const Ice::Current&); - virtual HR::EmpPrxSeq findByName(const std::string&, const Ice::Current&); - -private: - - const oracle::occi::Ref<DEPT_T> _ref; - const ConnectionHolderPtr _conh; - const DeptFactoryIPtr _factory; -}; - -#endif diff --git a/cpp/demo/Database/Oracle/occi/EmpI.cpp b/cpp/demo/Database/Oracle/occi/EmpI.cpp deleted file mode 100644 index bb64c9dd565..00000000000 --- a/cpp/demo/Database/Oracle/occi/EmpI.cpp +++ /dev/null @@ -1,191 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <EmpI.h> - -using namespace std; -using namespace oracle::occi; - -EmpI::EmpI(const RefAny& ref, const ConnectionHolderPtr& conh, const DeptFactoryIPtr& factory) : - _ref(ref), _conh(conh), _factory(factory) -{ -} - -HR::EmpDesc -EmpI::getDesc(const Ice::Current& current) -{ - Environment* env = _factory->getEnv(); - HR::EmpDesc result; - - Ref<EMP_T> empRef = decodeRef(current.id.name, env, _conh->connection()); - - result.empno = empRef->getEmpno(); - result.ename = empRef->getEname(); - result.job = empRef->getJob(); - - Ref<EMP_T> mgrRef = empRef->getMgrref(); - if(!mgrRef.isNull()) - { - Ice::Identity mgrId; - mgrId.name = encodeRef(mgrRef, env); - mgrId.category = _factory->getCategory(); - result.mgr = HR::EmpPrx::uncheckedCast(current.adapter->createProxy(mgrId)); - } - - result.hiredate = empRef->getHiredate().toText(); - - if(!empRef->getSal().isNull()) - { - try - { - result.sal = empRef->getSal().toText(env, "99999.99"); - } - catch(const std::exception&) - { - cerr << "sal overflow" << endl; - } - } - - if(!empRef->getComm().isNull()) - { - try - { - result.comm = empRef->getComm().toText(env, "99999.99"); - } - catch(const std::exception&) - { - cerr << "comm overflow" << endl; - } - } - - Ref<DEPT_T> deptRef = empRef->getDeptref(); - if(!deptRef.isNull()) - { - Ice::Identity deptId; - deptId.name = encodeRef(deptRef, env); - deptId.category = _factory->getCategory(); - result.edept = HR::DeptPrx::uncheckedCast(current.adapter->createProxy(deptId)); - } - _conh->commit(); - return result; -} - -void -EmpI::updateField(const string& field, const string& newValue, const Ice::Current& current) -{ - Ref<EMP_T> empRef = decodeRef(current.id.name, _factory->getEnv(), _conh->connection()); - - if(field == "ename") - { - empRef->setEname(newValue); - } - else if(field == "job") - { - empRef->setJob(newValue); - } - else if(field == "hiredate") - { - if(newValue == "") - { - empRef->setHiredate(Date()); - } - else - { - Date hiredate(_factory->getEnv()); - hiredate.fromText(newValue); - empRef->setHiredate(hiredate); - } - } - else if(field == "sal") - { - if(newValue == "") - { - empRef->setSal(Number()); - } - else - { - Number sal(0); - sal.fromText(_factory->getEnv(), newValue, "99999.99"); - empRef->setSal(sal); - } - } - else if(field == "comm") - { - if(newValue == "") - { - empRef->setComm(Number()); - } - else - { - Number comm(0); - comm.fromText(_factory->getEnv(), newValue, "0.999"); - empRef->setComm(comm); - } - } - else - { - throw HR::SqlException("There is no field " + field + " in type EMP_T"); - } - empRef->markModified(); - _conh->commit(); -} - -void -EmpI::updateMgr(int newMgr, const Ice::Current& current) -{ - Ref<EMP_T> empRef = decodeRef(current.id.name, _factory->getEnv(), _conh->connection()); - - if(newMgr == 0) - { - empRef->setMgrref(Ref<EMP_T>()); - } - else - { - Ref<EMP_T> mgrRef = _factory->findEmpRefByNo(newMgr, _conh->connection()); - - if(mgrRef.isNull()) - { - throw HR::SqlException("There is no employee with this empno"); - } - empRef->setMgrref(mgrRef); - } - empRef->markModified(); - _conh->commit(); -} - -void -EmpI::updateDept(int newDept, const Ice::Current& current) -{ - Ref<EMP_T> empRef = decodeRef(current.id.name, _factory->getEnv(), _conh->connection()); - - if(newDept == 0) - { - empRef->setDeptref(Ref<DEPT_T>()); - } - else - { - Ref<DEPT_T> deptRef = _factory->findDeptRefByNo(newDept, _conh->connection()); - - if(deptRef.isNull()) - { - throw HR::SqlException("There is no department with this deptno"); - } - empRef->setDeptref(deptRef); - } - empRef->markModified(); - _conh->commit(); -} - -void -EmpI::remove(const Ice::Current& current) -{ - Ref<EMP_T> empRef = decodeRef(current.id.name, _factory->getEnv(), _conh->connection()); - empRef->markDelete(); - _conh->commit(); -} diff --git a/cpp/demo/Database/Oracle/occi/EmpI.h b/cpp/demo/Database/Oracle/occi/EmpI.h deleted file mode 100644 index 77431b63b78..00000000000 --- a/cpp/demo/Database/Oracle/occi/EmpI.h +++ /dev/null @@ -1,40 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef EMPI_H -#define EMPI_H - -#include <Ice/Ice.h> -#include <DeptFactoryI.h> -#include <HR.h> -#include <occi.h> -#include <DbTypes.h> -#include <Util.h> - -class EmpI : public HR::Emp -{ -public: - - EmpI(const oracle::occi::RefAny&, const ConnectionHolderPtr&, const DeptFactoryIPtr&); - - virtual HR::EmpDesc getDesc(const Ice::Current&); - virtual void updateField(const std::string&, const std::string&, const Ice::Current&); - virtual void updateMgr(int, const Ice::Current&); - virtual void updateDept(int, const Ice::Current&); - - virtual void remove(const Ice::Current&); - -private: - - const oracle::occi::Ref<EMP_T> _ref; - const ConnectionHolderPtr _conh; - const DeptFactoryIPtr _factory; -}; - -#endif diff --git a/cpp/demo/Database/Oracle/occi/HR.ice b/cpp/demo/Database/Oracle/occi/HR.ice deleted file mode 100644 index 91687cc5839..00000000000 --- a/cpp/demo/Database/Oracle/occi/HR.ice +++ /dev/null @@ -1,89 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#pragma once - -// -// Corresponds to the well-known Dept/Emp Oracle demo database. -// See rdbms/admin/utlsamp.sql -// - - -module HR -{ - -interface Dept; -sequence<Dept*> DeptPrxSeq; - -interface Emp; -sequence<Emp*> EmpPrxSeq; - -exception SqlException -{ - string reason; -}; - -// -// The data we maintain about each department -// -struct DeptDesc -{ - int deptno; - string dname; - string loc; -}; - -// -// The data we maintain about each Employee -// -struct EmpDesc -{ - int empno; - string ename; - string job; - Emp* mgr; - string hiredate; - string sal; - string comm; - Dept* edept; -}; - -interface Emp -{ - idempotent EmpDesc getDesc(); - idempotent void updateField(string name, string newValue) throws SqlException; - idempotent void updateMgr(int mgr) throws SqlException; - idempotent void updateDept(int deptno) throws SqlException; - void remove(); -}; - -interface Dept -{ - Emp* createEmp(int empno, EmpDesc descx) throws SqlException; - - idempotent DeptDesc getDesc(); - idempotent void updateField(string name, string newValue) throws SqlException; - void remove() throws SqlException; - - idempotent EmpPrxSeq findAll(); - idempotent EmpPrxSeq findByName(string ename); -}; - -interface DeptFactory -{ - Dept* createDept(int deptno, DeptDesc desc) throws SqlException; - - idempotent DeptPrxSeq findAll(); - idempotent DeptPrxSeq findByName(string dname); - - idempotent Emp* findEmpByNo(int empno); - idempotent Dept* findDeptByNo(int deptno); -}; - -}; diff --git a/cpp/demo/Database/Oracle/occi/Makefile b/cpp/demo/Database/Oracle/occi/Makefile deleted file mode 100644 index 023f3cf6eab..00000000000 --- a/cpp/demo/Database/Oracle/occi/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -# -# This copy of Ice is licensed to you under the terms described in the -# ICE_LICENSE file included in this distribution. -# -# ********************************************************************** - -top_srcdir = ../../../.. - -MAXWARN = yes - -CLIENT = client -SERVER = server - -TARGETS = $(CLIENT) $(SERVER) - -SLICE_OBJS = HR.o - -COBJS = $(SLICE_OBJS) \ - Client.o - -SOBJS = $(SLICE_OBJS) \ - DbTypes.o \ - DbTypesMap.o \ - DeptFactoryI.o \ - DeptI.o \ - EmpI.o \ - OCCIServantLocator.o \ - Server.o \ - Util.o - -OBJS = $(COBJS) \ - $(SOBJS) - -include $(top_srcdir)/config/Make.rules - -CPPFLAGS := -I. -I$(ORACLE_HOME)/rdbms/public $(CPPFLAGS) - -ORACLE_LIBS = -L$(ORACLE_HOME)/lib -locci -lclntsh - -$(CLIENT): $(COBJS) - rm -f $@ - $(CXX) $(LDFLAGS) $(LDEXEFLAGS) -o $@ $(COBJS) $(LIBS) - -$(SERVER): $(SOBJS) - rm -f $@ - $(CXX) $(LDFLAGS) $(LDEXEFLAGS) -o $@ $(SOBJS) $(ORACLE_LIBS) $(LIBS) - - -DbTypes.h DbTypes.cpp DbTypesMap.h DbTypesMap.cpp DbTypesOut.typ: DbTypes.typ - ott userid=scott/tiger@orcl code=cpp hfile=DbTypes.h cppfile=DbTypes.cpp \ - mapfile=DbTypesMap.cpp intype=DbTypes.typ outtype=DbTypesOut.typ \ - attraccess=private - -clean:: - -rm -f DbTypes.h DbTypes.cpp DbTypesMap.h DbTypesMap.cpp DbTypesOut.typ diff --git a/cpp/demo/Database/Oracle/occi/Makefile.mak b/cpp/demo/Database/Oracle/occi/Makefile.mak deleted file mode 100644 index 5cdc7dba4b1..00000000000 --- a/cpp/demo/Database/Oracle/occi/Makefile.mak +++ /dev/null @@ -1,93 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -# -# This copy of Ice is licensed to you under the terms described in the -# ICE_LICENSE file included in this distribution. -# -# ********************************************************************** - -top_srcdir = ..\..\..\.. - -MAXWARN = yes - -CLIENT = client.exe -SERVER = server.exe - -TARGETS = $(CLIENT) $(SERVER) - -SLICE_OBJS = .\HR.obj - -COBJS = $(SLICE_OBJS) \ - .\Client.obj - -SOBJS = $(SLICE_OBJS) \ - .\DbTypes.obj \ - .\DbTypesMap.obj \ - .\DeptFactoryI.obj \ - .\DeptI.obj \ - .\EmpI.obj \ - .\OCCIServantLocator.obj \ - .\Server.obj \ - .\Util.obj - -OBJS = $(COBJS) \ - $(SOBJS) - -!include $(top_srcdir)\config\Make.rules.mak - - -!if "$(GENERATE_PDB)" == "yes" -CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) -SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) -!endif - -# -# OCCI -# -!if "$(CPP_COMPILER)" == "VC120" -OCCI_LIBSUBDIR = VC12 -!else if "$(CPP_COMPILER)" == "VC110" -OCCI_LIBSUBDIR = VC11 -!else -!error "$(CPP_COMPILER) is not supported by this demo" -!endif - -# -# Oracle instantclient home -# -!if "$(ORACLE_INSTANTCLIENT_HOME)" == "" -OCCI_LIBDIR = $(ORACLE_HOME)\oci\lib\msvc -OCCI_INCLUDEDIR = $(ORACLE_HOME)\oci\include -!else -OCCI_LIBDIR = $(ORACLE_INSTANTCLIENT_HOME)\sdk\lib\msvc -OCCI_INCLUDEDIR = $(ORACLE_INSTANTCLIENT_HOME)\sdk\include -!endif - -# -# OCCI libraries default location, adjust to match your setup. -# -ORACLE_LIBS = -LIBPATH:"$(OCCI_LIBDIR)\msvc\$(OCCI_LIBSUBDIR)" oraocci12$(LIBSUFFIX).lib -LIBPATH:"$(OCCI_LIBDIR)" oci.lib - -# -# Disable warnings 4101 and 4291 issued when compiling DbTypes.cpp -# -CPPFLAGS = -I. -I$(OCCI_INCLUDEDIR) -wd4101 -wd4291 $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN - -$(CLIENT): $(COBJS) - $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) - @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ - $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest - -$(SERVER): $(SOBJS) - $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) $(ORACLE_LIBS) - @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ - $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest - -DbTypes.h DbTypes.cpp DbTypesMap.h DbTypesMap.cpp DbTypesOut.typ: DbTypes.typ - ott userid=scott/tiger@orcl code=cpp hfile=DbTypes.h cppfile=DbTypes.cpp mapfile=DbTypesMap.cpp \ - intype=DbTypes.typ outtype=DbTypesOut.typ attraccess=private - -clean:: - del /q HR.cpp HR.h - del /q DbTypes.h DbTypes.cpp DbTypesMap.h DbTypesMap.cpp DbTypesOut.typ diff --git a/cpp/demo/Database/Oracle/occi/OCCIServantLocator.cpp b/cpp/demo/Database/Oracle/occi/OCCIServantLocator.cpp deleted file mode 100644 index e9ec91ff80e..00000000000 --- a/cpp/demo/Database/Oracle/occi/OCCIServantLocator.cpp +++ /dev/null @@ -1,80 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <OCCIServantLocator.h> -#include <EmpI.h> -#include <DeptI.h> -#include <DbTypes.h> -#include <Util.h> -#include <occi.h> - -using namespace std; -using namespace oracle::occi; - -OCCIServantLocator::OCCIServantLocator(const DeptFactoryIPtr& factory) : - _factory(factory) -{} - - -Ice::ObjectPtr -OCCIServantLocator::locate(const Ice::Current& current, Ice::LocalObjectPtr& cookie) -{ - ConnectionHolderPtr con = new ConnectionHolder(_factory->getConnectionPool()); - RefAny ref = decodeRef(current.id.name, _factory->getEnv(), con->connection()); - - try - { - // - // Extract SQL type from target object - // - string sqlType = Ref<PObject>(ref)->getSQLTypeName(); - - // - // Create and return the servant, used only for this one operation - // - if(sqlType.find("EMP_T") != string::npos) - { - return new EmpI(ref, con, _factory); - } - else if(sqlType.find("DEPT_T") != string::npos) - { - return new DeptI(ref, con, _factory); - } - else - { - return 0; - } - } - catch(const SQLException& sqle) - { - if(sqle.getErrorCode() == 21700) - { - return 0; - } - else - { - throw; - } - } -} - -void -OCCIServantLocator::finished(const Ice::Current&, const Ice::ObjectPtr&, const Ice::LocalObjectPtr&) -{ - // - // Nothing to do: if the connection was not yet released, it is released (and the tx rolled back) - // when the servant's last refcount goes away - // -} - -void -OCCIServantLocator::deactivate(const string&) -{ -} - diff --git a/cpp/demo/Database/Oracle/occi/OCCIServantLocator.h b/cpp/demo/Database/Oracle/occi/OCCIServantLocator.h deleted file mode 100644 index 1938984a685..00000000000 --- a/cpp/demo/Database/Oracle/occi/OCCIServantLocator.h +++ /dev/null @@ -1,31 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef OCCI_SERVANT_LOCATOR_H -#define OCCI_SERVANT_LOCATOR_H - -#include <DeptFactoryI.h> -#include <Ice/ServantLocator.h> -#include <occi.h> - -class OCCIServantLocator : public Ice::ServantLocator -{ -public: - - OCCIServantLocator(const DeptFactoryIPtr&); - - virtual Ice::ObjectPtr locate(const Ice::Current&, Ice::LocalObjectPtr&); - virtual void finished(const Ice::Current&, const Ice::ObjectPtr&, const Ice::LocalObjectPtr&); - virtual void deactivate(const std::string&); - -private: - DeptFactoryIPtr _factory; -}; - -#endif diff --git a/cpp/demo/Database/Oracle/occi/README b/cpp/demo/Database/Oracle/occi/README deleted file mode 100644 index 7fb4ab8fc84..00000000000 --- a/cpp/demo/Database/Oracle/occi/README +++ /dev/null @@ -1,101 +0,0 @@ -Oracle OCCI demo -================ - -This demo shows how to implement an Ice server that uses Oracle -through its Oracle C++ Call Interface (OCCI) API. - -It is a fairly simple demo that illustrates how to: - - - Map relational data to Ice objects, in particular convert between - Ice and OCCI types. - - Use an OCCI pool to provide Oracle connections to Ice requests. - - Use an Ice servant locator. - - -Building the demo ------------------ - -OCCI is only available for some C++ compilers. Make sure to select a -platform and C++ compiler supported by both Ice and OCCI. - -OCCI Oracle drivers are available at: - - http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html - -- Setup an Oracle database with the traditional EMP/DEPT schema. - With Oracle Server 12c, the corresponding SQL script is - $ORACLE_HOME/rdbms/admin/utlsampl.sql. - -- Ensure that your user (by default, scott) has the CREATE VIEW - privilege. - -- Create object types and views using the provided createTypes.sql - script. For example: - - % sqlplus /nolog - SQL> @createTypes.sql - - This script assumes that you can connect to your database with - 'scott/tiger@orcl'. If you need another connect-string, edit - createTypes.sql. - -- Oracle's ott utility needs to connect to the database in order to - generate code from the file 'DbTypes.typ'. The default connect- - string is "scott/tiger@orcl". If this is not appropriate, edit the - corresponding Makefile target, or the Custom build rule for - Visual Studio projects. - -- Set the environment variable ORACLE_HOME to point to your Oracle - installation home directory. - -- On Windows with Visual Studio Project Files: - - - Oracle settings are configured using a property sheet named oracle - that is attached to the server project configurations. Open the - Visual Studio Property Manager from "View > Property Manager" menu. - - - Expand the server configuration and double click the oracle - property sheet to edit it. - - - Click "Common Properties > User Macros" and set the ORACLE_HOME - value to match your Oracle deployment. - - - Occi libraries and drivers for Visual Studio 2012 x64 are included - with Oracle 12c. If you are using a different compiler or arch you - will need to install the corresponding Oracle instant client - package from: - - http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html - - Follow the link corresponding to the platform you want to use and - setup both: - - - instantclient-basic-nt-12.1.0.2.0.zip - - instantclient-sdk-nt-12.1.0.2.0.zip - - After that set the ORACLE_INSTANTCLIENT_HOME value in the oracle - property sheet to match your setup. - - - Make sure to save the changes to the property sheet using the save - button in the Property Manager windows so changes take effect. - -- On Windows, when using nmake Makefiles, set the ORACLE_HOME and - ORACLE_INSTANTCLIENT_HOME variables in your enviroment to match your - Oracle setup and review Makefile.mak. - -- Then build as usual. - - -Running the demo ----------------- - -- Review the Oracle properties in the config.server file. You may need - to change them to connect to your Oracle instance. - -- Start the server: - - $ server - -- Start the client in a separate window: - - $ client diff --git a/cpp/demo/Database/Oracle/occi/Server.cpp b/cpp/demo/Database/Oracle/occi/Server.cpp deleted file mode 100644 index ee5078baae9..00000000000 --- a/cpp/demo/Database/Oracle/occi/Server.cpp +++ /dev/null @@ -1,94 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/Ice.h> -#include <DeptFactoryI.h> -#include <OCCIServantLocator.h> -#include <occi.h> -#include <DbTypesMap.h> - -using namespace std; -using namespace oracle::occi; - -class HRServer : public Ice::Application -{ -public: - - virtual int run(int, char*[]); -}; - -int -main(int argc, char* argv[]) -{ - HRServer app; - return app.main(argc, argv, "config.server"); -} - -int -HRServer::run(int argc, char* argv[]) -{ - if(argc > 1) - { - cerr << appName() << ": too many arguments" << endl; - return EXIT_FAILURE; - } - - const string username = communicator()->getProperties()->getPropertyWithDefault("Oracle.Username", "scott"); - const string password = communicator()->getProperties()->getPropertyWithDefault("Oracle.Password", "password"); - const string connectString = communicator()->getProperties()->getProperty("Oracle.ConnectString"); - - // - // We use a single servant locator and a single category for all Emp and Dept objects - // - const string category = "OCCI"; - - Environment* env = 0; - StatelessConnectionPool* pool = 0; - - try - { - env = Environment::createEnvironment(Environment::Mode(Environment::THREADED_MUTEXED | Environment::OBJECT)); - DbTypesMap(env); - - pool = env->createStatelessConnectionPool(username, password, connectString, 5, 2, 1, - StatelessConnectionPool::HOMOGENEOUS); - - Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("HR"); - - DeptFactoryIPtr factory = new DeptFactoryI(env, pool, category); - adapter->addServantLocator(new OCCIServantLocator(factory), category); - - adapter->add(factory, communicator()->stringToIdentity("DeptFactory")); - - adapter->activate(); - communicator()->waitForShutdown(); - } - catch(...) - { - if(pool != 0) - { - env->terminateStatelessConnectionPool(pool); - } - if(env != 0) - { - Environment::terminateEnvironment(env); - } - throw; - } - - if(pool != 0) - { - env->terminateStatelessConnectionPool(pool); - } - if(env != 0) - { - Environment::terminateEnvironment(env); - } - return EXIT_SUCCESS; -} diff --git a/cpp/demo/Database/Oracle/occi/Util.cpp b/cpp/demo/Database/Oracle/occi/Util.cpp deleted file mode 100644 index ef9645e993f..00000000000 --- a/cpp/demo/Database/Oracle/occi/Util.cpp +++ /dev/null @@ -1,153 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/Ice.h> -#include <HR.h> -#include <Util.h> -#include <sstream> - -using namespace std; -using namespace oracle::occi; - -ConnectionHolder::ConnectionHolder(StatelessConnectionPool* pool) : - _con(pool->getAnyTaggedConnection()), - _txDone(false), - _pool(pool) -{ -} - -void -ConnectionHolder::commit() -{ - _txDone = true; - try - { - _con->commit(); - } - catch(const SQLException& e) - { - throw HR::SqlException(e.what()); - } -} - -void -ConnectionHolder::rollback() -{ - _txDone = true; - try - { - _con->rollback(); - } - catch(const SQLException& e) - { - throw HR::SqlException(e.what()); - } -} - -ConnectionHolder::~ConnectionHolder() -{ - if(!_txDone) - { - _txDone = true; - try - { - _con->rollback(); - } - catch(const std::exception&) - { - } - } - - try - { - _pool->releaseConnection(_con); - } - catch(const std::exception&) - { - } -} - -StatementHolder::StatementHolder(Connection* con) : - _con(con), - _stmt(con->createStatement()) -{ -} - -StatementHolder::StatementHolder(const ConnectionHolderPtr& conh) : - _con(conh->connection()), - _stmt(conh->connection()->createStatement()) -{ -} - -StatementHolder::~StatementHolder() -{ - _con->terminateStatement(_stmt); -} - -string -encodeRef(const RefAny& ref, Environment* env) -{ - string result; - - ub4 length = OCIRefHexSize(env->getOCIEnvironment(), ref.getRef()); - OraText* buffer = new OraText[length]; - - OCIError* error = 0; - OCIHandleAlloc(env->getOCIEnvironment(), reinterpret_cast<void**>(&error), OCI_HTYPE_ERROR, 0, 0); - sword status = OCIRefToHex(env->getOCIEnvironment(), error, ref.getRef(), buffer, &length); - - if(status == OCI_SUCCESS) - { - result.assign(reinterpret_cast<char*>(buffer), length); - } - else - { - cerr << "encodeRef failed: "; - sb4 errcode = 0; - OraText buf[512]; - OCIErrorGet(error, 1, 0, &errcode, buf, 512, OCI_HTYPE_ERROR); - cerr << reinterpret_cast<char*>(buf) << endl; - } - - OCIHandleFree(error, OCI_HTYPE_ERROR); - delete[] buffer; - return result; -} - -RefAny -decodeRef(const string& str, Environment* env, Connection* con) -{ - OCIRef* ref = 0; - OCIError* error = 0; - OCIHandleAlloc(env->getOCIEnvironment(), reinterpret_cast<void**>(&error), OCI_HTYPE_ERROR, 0, 0); - - sword status = OCIRefFromHex(env->getOCIEnvironment(), error, - con->getOCIServiceContext(), - reinterpret_cast<const OraText*>(str.c_str()), static_cast<ub4>(str.length()), - &ref); - - - - if(status == OCI_SUCCESS) - { - OCIHandleFree(error, OCI_HTYPE_ERROR); - return RefAny(con, ref); - } - else - { - cerr << "decodeRef failed: "; - sb4 errcode = 0; - OraText buf[512]; - OCIErrorGet(error, 1, 0, &errcode, buf, 512, OCI_HTYPE_ERROR); - cerr << reinterpret_cast<char*>(buf) << endl; - - OCIHandleFree(error, OCI_HTYPE_ERROR); - throw Ice::ObjectNotExistException(__FILE__, __LINE__); - } -} diff --git a/cpp/demo/Database/Oracle/occi/Util.h b/cpp/demo/Database/Oracle/occi/Util.h deleted file mode 100644 index 8ee31af60cc..00000000000 --- a/cpp/demo/Database/Oracle/occi/Util.h +++ /dev/null @@ -1,73 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef UTIL_H -#define UTIL_H - -#include <occi.h> -#include <string> - -// -// Grabs a connection from a connection pool and ensures -// it's properly released when the ConnectionHolder is destroyed -// -class ConnectionHolder : public IceUtil::Shared -{ -public: - - ConnectionHolder(oracle::occi::StatelessConnectionPool*); - - oracle::occi::Connection* connection() const - { - return _con; - } - - void commit(); - void rollback(); - -protected: - virtual ~ConnectionHolder(); - -private: - - oracle::occi::Connection* _con; - bool _txDone; - oracle::occi::StatelessConnectionPool* _pool; -}; - -typedef IceUtil::Handle<ConnectionHolder> ConnectionHolderPtr; - -// -// Create a fresh exception-safe statement (typically on the stack) -// -class StatementHolder -{ -public: - StatementHolder(oracle::occi::Connection*); - StatementHolder(const ConnectionHolderPtr&); - ~StatementHolder(); - - oracle::occi::Statement* statement() const - { - return _stmt; - } - -private: - oracle::occi::Connection* _con; - oracle::occi::Statement* _stmt; -}; - - -// -// Encode/decode a RefAny into a string -// -std::string encodeRef(const oracle::occi::RefAny&, oracle::occi::Environment*); -oracle::occi::RefAny decodeRef(const std::string&, oracle::occi::Environment*v, oracle::occi::Connection*); - -#endif diff --git a/cpp/demo/Database/Oracle/occi/client.vcxproj b/cpp/demo/Database/Oracle/occi/client.vcxproj deleted file mode 100644 index bf7ad7f406b..00000000000 --- a/cpp/demo/Database/Oracle/occi/client.vcxproj +++ /dev/null @@ -1,210 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{8DC8367E-FC55-4BDC-AAC0-85DFA76E0074}</ProjectGuid> - <RootNamespace>client</RootNamespace> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseOfMfc>false</UseOfMfc> - <PlatformToolset>v110</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseOfMfc>false</UseOfMfc> - <PlatformToolset>v110</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseOfMfc>false</UseOfMfc> - <PlatformToolset>v110</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseOfMfc>false</UseOfMfc> - <PlatformToolset>v110</PlatformToolset> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(ALLUSERSPROFILE)\ZeroC\Ice.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(ALLUSERSPROFILE)\ZeroC\Ice.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(ALLUSERSPROFILE)\ZeroC\Ice.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(ALLUSERSPROFILE)\ZeroC\Ice.props" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup> - <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\$(ProjectName)\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\$(ProjectName)\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <Optimization>MaxSpeed</Optimization> - <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> - <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_CONSOLE;NDEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <StringPooling>true</StringPooling> - <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> - <FunctionLevelLinking>true</FunctionLevelLinking> - <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Culture>0x0409</Culture> - </ResourceCompile> - <Link> - <AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>setargv.obj;%(AdditionalDependencies)</AdditionalDependencies> - <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> - <SubSystem>Console</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention> - </DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <Optimization>MaxSpeed</Optimization> - <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> - <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_CONSOLE;NDEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <StringPooling>true</StringPooling> - <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> - <FunctionLevelLinking>true</FunctionLevelLinking> - <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Culture>0x0409</Culture> - </ResourceCompile> - <Link> - <AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>setargv.obj;%(AdditionalDependencies)</AdditionalDependencies> - <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> - <SubSystem>Console</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention> - </DataExecutionPrevention> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_CONSOLE;_DEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Culture>0x0409</Culture> - </ResourceCompile> - <Link> - <AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions> - <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> - <GenerateDebugInformation>true</GenerateDebugInformation> - <SubSystem>Console</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention> - </DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_CONSOLE;_DEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Culture>0x0409</Culture> - </ResourceCompile> - <Link> - <AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions> - <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> - <GenerateDebugInformation>true</GenerateDebugInformation> - <SubSystem>Console</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention> - </DataExecutionPrevention> - </Link> - </ItemDefinitionGroup> - <ItemGroup> - <ClCompile Include="Client.cpp"> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="HR.cpp" /> - </ItemGroup> - <ItemGroup> - <ClInclude Include="HR.h" /> - </ItemGroup> - <ItemGroup> - <None Include="HR.ice" /> - <None Include="README" /> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> - <ProjectExtensions> - <VisualStudio> - <UserProperties ZerocIce_Enabled="True" ZerocIce_VerboseLevel="1" ZerocIce_ProjectVersion="3.6" /> - </VisualStudio> - </ProjectExtensions> -</Project> diff --git a/cpp/demo/Database/Oracle/occi/config.client b/cpp/demo/Database/Oracle/occi/config.client deleted file mode 100644 index 275ec9fdc68..00000000000 --- a/cpp/demo/Database/Oracle/occi/config.client +++ /dev/null @@ -1 +0,0 @@ -HR.DeptFactory=DeptFactory:tcp -h localhost -p 12000 diff --git a/cpp/demo/Database/Oracle/occi/config.server b/cpp/demo/Database/Oracle/occi/config.server deleted file mode 100644 index c4a32e84690..00000000000 --- a/cpp/demo/Database/Oracle/occi/config.server +++ /dev/null @@ -1,7 +0,0 @@ -HR.Endpoints=tcp -h localhost -p 12000 - -Ice.ThreadPool.Server.Size=5 - -Oracle.Username=scott -Oracle.Password=tiger -Oracle.ConnectString=orcl diff --git a/cpp/demo/Database/Oracle/occi/createTypes.sql b/cpp/demo/Database/Oracle/occi/createTypes.sql deleted file mode 100644 index 3c8422d9764..00000000000 --- a/cpp/demo/Database/Oracle/occi/createTypes.sql +++ /dev/null @@ -1,54 +0,0 @@ -Rem -Rem Copyright (c) 2006 ZeroC, Inc. All rights reserved. -Rem -Rem This copy of Ice is licensed to you under the terms described in the -Rem ICE_LICENSE file included in this distribution. - -Rem -Rem Create object types and views for the DEPT and EMP tables -Rem - -SET ECHO ON - -CONNECT scott/tiger@orcl - -DROP VIEW EMP_VIEW; -DROP VIEW DEPT_VIEW; -DROP TYPE EMP_T; -DROP TYPE DEPT_T; - -CREATE TYPE DEPT_T AS OBJECT( - DEPTNO NUMBER(2), - DNAME VARCHAR2(14), - LOC VARCHAR2(13)); -/ - -CREATE TYPE EMP_T; -/ -CREATE TYPE EMP_T AS OBJECT( - EMPNO NUMBER(4), - ENAME VARCHAR2(10), - JOB VARCHAR2(9), - MGRREF REF EMP_T, - HIREDATE DATE, - SAL NUMBER(7,2), - COMM NUMBER(7,2), - DEPTREF REF DEPT_T); -/ - -CREATE VIEW DEPT_VIEW OF DEPT_T WITH OBJECT IDENTIFIER(DEPTNO) - AS SELECT DEPTNO, DNAME, LOC FROM DEPT; - -Rem -Rem Need to create the view in two steps since it references itself -Rem -CREATE VIEW EMP_VIEW OF EMP_T WITH OBJECT IDENTIFIER(EMPNO) - AS SELECT EMPNO, ENAME, JOB, NULL, HIREDATE, SAL, COMM, - MAKE_REF(DEPT_VIEW, DEPTNO) FROM EMP; - -CREATE OR REPLACE VIEW EMP_VIEW OF EMP_T WITH OBJECT IDENTIFIER(EMPNO) - AS SELECT EMPNO, ENAME, JOB, MAKE_REF(EMP_VIEW, MGR), HIREDATE, SAL, - COMM, MAKE_REF(DEPT_VIEW, DEPTNO) FROM EMP; - -COMMIT; -EXIT diff --git a/cpp/demo/Database/Oracle/occi/oracle.props b/cpp/demo/Database/Oracle/occi/oracle.props deleted file mode 100644 index 6ae5ff446cf..00000000000 --- a/cpp/demo/Database/Oracle/occi/oracle.props +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ImportGroup Label="PropertySheets" /> - <PropertyGroup Label="UserMacros"> - <ORACLE_HOME>C:\oracle\product\12.1.0\dbhome_1</ORACLE_HOME> - <ORACLE_INSTANTCLIENT_HOME>C:\instantclient_12_1</ORACLE_INSTANTCLIENT_HOME> - </PropertyGroup> - <PropertyGroup Condition="'$(PlatformToolset)' == 'v110' And '$(Platform)' == 'x64' And '$(Configuration)' == 'Release'"> - <LibraryPath>$(ORACLE_HOME)\OCI\lib\msvc\VC11;$(ORACLE_INSTANTCLIENT_HOME)\sdk\lib\msvc;$(LibraryPath)</LibraryPath> - <IncludePath>$(ORACLE_HOME)\OCI\include;$(IncludePath)</IncludePath> - <ExecutablePath>$(ORACLE_HOME)\bin;$(ExecutablePath)</ExecutablePath> - <OciBinDir>$(ORACLE_HOME)\bin</OciBinDir> - </PropertyGroup> - <PropertyGroup Condition="('$(PlatformToolset)' == 'v110' And '$(Platform)' == 'Win32') Or ('$(PlatformToolset)' == 'v110' And '$(Platform)' == 'x64' And '$(Configuration)' == 'Debug')"> - <LibraryPath>$(ORACLE_INSTANTCLIENT_HOME)\sdk\lib\msvc\VC11;$(ORACLE_INSTANTCLIENT_HOME)\sdk\lib\msvc;$(LibraryPath)</LibraryPath> - <IncludePath>$(ORACLE_INSTANTCLIENT_HOME)\sdk\include;$(IncludePath)</IncludePath> - <ExecutablePath>$(ORACLE_HOME)\bin;$(ExecutablePath)</ExecutablePath> - <OciBinDir>$(ORACLE_INSTANTCLIENT_HOME)\vc11;$(ORACLE_INSTANTCLIENT_HOME)</OciBinDir> - </PropertyGroup> - <PropertyGroup Condition="'$(PlatformToolset)' == 'v120'"> - <LibraryPath>$(ORACLE_INSTANTCLIENT_HOME)\sdk\lib\msvc\VC12;$(ORACLE_INSTANTCLIENT_HOME)\sdk\lib\msvc;$(LibraryPath)</LibraryPath> - <IncludePath>$(ORACLE_INSTANTCLIENT_HOME)\sdk\include;$(IncludePath)</IncludePath> - <ExecutablePath>$(ORACLE_HOME)\bin;$(ExecutablePath)</ExecutablePath> - <OciBinDir>$(ORACLE_INSTANTCLIENT_HOME)\vc12;$(ORACLE_INSTANTCLIENT_HOME)</OciBinDir> - </PropertyGroup> - <ItemDefinitionGroup /> - <ItemGroup> - <BuildMacro Include="ORACLE_HOME"> - <Value>$(ORACLE_HOME)</Value> - <EnvironmentVariable>true</EnvironmentVariable> - </BuildMacro> - <BuildMacro Include="ORACLE_INSTANTCLIENT_HOME"> - <Value>$(ORACLE_INSTANTCLIENT_HOME)</Value> - <EnvironmentVariable>true</EnvironmentVariable> - </BuildMacro> - <BuildMacro Include="OciBinDir"> - <Value>$(OciBinDir)</Value> - <EnvironmentVariable>true</EnvironmentVariable> - </BuildMacro> - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/cpp/demo/Database/Oracle/occi/server.vcxproj b/cpp/demo/Database/Oracle/occi/server.vcxproj deleted file mode 100644 index 72adc461d52..00000000000 --- a/cpp/demo/Database/Oracle/occi/server.vcxproj +++ /dev/null @@ -1,312 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{C234B2E6-EE0A-44BD-AA82-CFBF3E47239D}</ProjectGuid> - <RootNamespace>server</RootNamespace> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseOfMfc>false</UseOfMfc> - <PlatformToolset>v110</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseOfMfc>false</UseOfMfc> - <PlatformToolset>v110</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseOfMfc>false</UseOfMfc> - <PlatformToolset>v110</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseOfMfc>false</UseOfMfc> - <PlatformToolset>v110</PlatformToolset> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(ALLUSERSPROFILE)\ZeroC\Ice.props" /> - <Import Project="oracle.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(ALLUSERSPROFILE)\ZeroC\Ice.props" /> - <Import Project="oracle.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(ALLUSERSPROFILE)\ZeroC\Ice.props" /> - <Import Project="oracle.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(ALLUSERSPROFILE)\ZeroC\Ice.props" /> - <Import Project="oracle.props" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup> - <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\$(ProjectName)\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\$(ProjectName)\</IntDir> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> - <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <AdditionalOptions>/wd4101 /wd4291 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> - <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_CONSOLE;NDEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <StringPooling>true</StringPooling> - <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> - <FunctionLevelLinking>true</FunctionLevelLinking> - <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Culture>0x0409</Culture> - </ResourceCompile> - <Link> - <AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>oraocci12.lib;oci.lib;setargv.obj;%(AdditionalDependencies)</AdditionalDependencies> - <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> - <SubSystem>Console</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention> - </DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <AdditionalOptions>/wd4101 /wd4291 %(AdditionalOptions)</AdditionalOptions> - <Optimization>MaxSpeed</Optimization> - <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> - <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_CONSOLE;NDEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <StringPooling>true</StringPooling> - <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> - <FunctionLevelLinking>true</FunctionLevelLinking> - <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Culture>0x0409</Culture> - </ResourceCompile> - <Link> - <AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>oraocci12.lib;oci.lib;setargv.obj;%(AdditionalDependencies)</AdditionalDependencies> - <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> - <SubSystem>Console</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention> - </DataExecutionPrevention> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <AdditionalOptions>/wd4101 /wd4291 %(AdditionalOptions)</AdditionalOptions> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_CONSOLE;_DEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Culture>0x0409</Culture> - </ResourceCompile> - <Link> - <AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>oraocci12d.lib;oci.lib;setargv.obj;%(AdditionalDependencies)</AdditionalDependencies> - <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> - <GenerateDebugInformation>true</GenerateDebugInformation> - <SubSystem>Console</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention> - </DataExecutionPrevention> - <TargetMachine>MachineX86</TargetMachine> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <AdditionalOptions>/wd4101 /wd4291 %(AdditionalOptions)</AdditionalOptions> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_CONSOLE;_DEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <WarningLevel>Level4</WarningLevel> - <TreatWarningAsError>true</TreatWarningAsError> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Culture>0x0409</Culture> - </ResourceCompile> - <Link> - <AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions> - <AdditionalDependencies>oraocci12d.lib;oci.lib;setargv.obj;%(AdditionalDependencies)</AdditionalDependencies> - <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> - <GenerateDebugInformation>true</GenerateDebugInformation> - <SubSystem>Console</SubSystem> - <RandomizedBaseAddress>false</RandomizedBaseAddress> - <DataExecutionPrevention> - </DataExecutionPrevention> - </Link> - </ItemDefinitionGroup> - <ItemGroup> - <ClCompile Include="DbTypes.cpp"> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="DbTypesMap.cpp"> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="DeptFactoryI.cpp"> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="DeptI.cpp"> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="EmpI.cpp"> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="HR.cpp" /> - <ClCompile Include="OCCIServantLocator.cpp"> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="Server.cpp"> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="Util.cpp"> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - </ItemGroup> - <ItemGroup> - <ClInclude Include="DbTypes.h" /> - <ClInclude Include="DbTypesMap.h" /> - <ClInclude Include="DeptFactoryI.h" /> - <ClInclude Include="DeptI.h" /> - <ClInclude Include="EmpI.h" /> - <ClInclude Include="HR.h" /> - <ClInclude Include="OCCIServantLocator.h" /> - <ClInclude Include="Util.h" /> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="DbTypes.typ"> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ott userid=scott/tiger%40orcl code=cpp hfile=%(Filename).h cppfile=%(Filename).cpp mapfile=%(Filename)Map.cpp intype=%(FullPath) outtype=%(Filename)Out.typ attraccess=private -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ott userid=scott/tiger%40orcl code=cpp hfile=%(Filename).h cppfile=%(Filename).cpp mapfile=%(Filename)Map.cpp intype=%(FullPath) outtype=%(Filename)Out.typ attraccess=private -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).h;%(Filename).cpp;%(Filename)Map.h;%(Filename)Map.cpp;%(Filename)Out.typ;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).h;%(Filename).cpp;%(Filename)Map.h;%(Filename)Map.cpp;%(Filename)Out.typ;%(Outputs)</Outputs> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ott userid=scott/tiger%40orcl code=cpp hfile=%(Filename).h cppfile=%(Filename).cpp mapfile=%(Filename)Map.cpp intype=%(FullPath) outtype=%(Filename)Out.typ attraccess=private -</Command> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ott userid=scott/tiger%40orcl code=cpp hfile=%(Filename).h cppfile=%(Filename).cpp mapfile=%(Filename)Map.cpp intype=%(FullPath) outtype=%(Filename)Out.typ attraccess=private -</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).h;%(Filename).cpp;%(Filename)Map.h;%(Filename)Map.cpp;%(Filename)Out.typ;%(Outputs)</Outputs> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).h;%(Filename).cpp;%(Filename)Map.h;%(Filename)Map.cpp;%(Filename)Out.typ;%(Outputs)</Outputs> - </CustomBuild> - <None Include="HR.ice" /> - <None Include="createTypes.sql" /> - <None Include="README.txt" /> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> - <ProjectExtensions> - <VisualStudio> - <UserProperties ZerocIce_Enabled="True" ZerocIce_VerboseLevel="1" ZerocIce_ProjectVersion="3.6" /> - </VisualStudio> - </ProjectExtensions> -</Project> |