Index: version_fu.h =================================================================== RCS file: /cvs/cvsnt/version_fu.h,v retrieving revision 1.1.2.6.8.1.6.3 diff -c -r1.1.2.6.8.1.6.3 version_fu.h *** version_fu.h 12 Oct 2015 04:00:00 -0000 1.1.2.6.8.1.6.3 --- version_fu.h 20 Feb 2020 03:53:01 -0000 *************** *** 232,237 **** --- 232,244 ---- #if (OCI_MAJOR_VERSION == 11) #define CVSNT_PROD_ORA_STRING "client 11g [" PP_STRINGIZE(OCI_MAJOR_VERSION.OCI_MINOR_VERSION) "]" #endif + #if (OCI_MAJOR_VERSION == 12) + #if (OCI_MINOR_VERSION >= 2) + #define CVSNT_PROD_ORA_STRING "client 12.2 or 12c [" PP_STRINGIZE(OCI_MAJOR_VERSION.OCI_MINOR_VERSION) "]" + #else + #define CVSNT_PROD_ORA_STRING "client 12.x [" PP_STRINGIZE(OCI_MAJOR_VERSION.OCI_MINOR_VERSION) "]" + #endif + #endif #if (OCI_MAJOR_VERSION > 11) #define CVSNT_PROD_ORA_STRING "client later than 11g [" PP_STRINGIZE(OCI_MAJOR_VERSION.OCI_MINOR_VERSION) "]" #endif Index: cvsapi/oracle/OracleConnection.cpp =================================================================== RCS file: /cvs/cvsnt/cvsapi/oracle/OracleConnection.cpp,v retrieving revision 1.1.2.14.2.11 diff -c -r1.1.2.14.2.11 OracleConnection.cpp *** cvsapi/oracle/OracleConnection.cpp 21 Oct 2015 04:23:38 -0000 1.1.2.14.2.11 --- cvsapi/oracle/OracleConnection.cpp 20 Feb 2020 04:27:41 -0000 *************** *** 61,67 **** --- 61,75 ---- #ifdef _WIN32 #ifdef OCI_MAJOR_VERSION + #if (OCI_MAJOR_VERSION == 10) #pragma comment(lib, "oraocci10") + #endif + #if (OCI_MAJOR_VERSION == 11) + #pragma comment(lib, "oraocci11") + #endif + #if (OCI_MAJOR_VERSION == 12) + #pragma comment(lib, "oraocci12") + #endif #pragma comment(lib, "oci") //#pragma comment(linker, "/DELAYLOAD:\"oci.dll\"") //#pragma comment(linker, "/DELAYLOAD:\"oraocci10.dll\"") *************** *** 1022,1027 **** --- 1030,1095 ---- } #endif + #ifdef OCI_MAJOR_VERSION + // begin stuff for Oracle 12 + if (!openocci) + { + CServerIo::trace(3,"COracleConnection::Open - try and ImageLoad oraocci12.dll, so we can check it is in the PATH and if it is x32 or x64"); + pocci=ImageLoad("oraocci12.dll",NULL); + if (pocci==NULL) + CServerIo::trace(3,"COracleConnection::Open - Couldn't load image of oraocci12.dll, not in PATH?"); + else + { + if (pocci->FileHeader!=NULL) + { + switch (pocci->FileHeader->FileHeader.Machine) { + case IMAGE_FILE_MACHINE_I386: + CServerIo::trace(3,"COracleConnection::Open - This is an x86 image of oraocci12.dll, %04x.",pocci->FileHeader->FileHeader.Machine); + break; + case IMAGE_FILE_MACHINE_IA64: + CServerIo::trace(3,"COracleConnection::Open - This is an Itanium image of oraocci12.dll, %04x.",pocci->FileHeader->FileHeader.Machine); + break; + case IMAGE_FILE_MACHINE_AMD64: + CServerIo::trace(3,"COracleConnection::Open - This is an x64 image of oraocci12.dll, %04x.",pocci->FileHeader->FileHeader.Machine); + break; + default : + CServerIo::trace(3,"COracleConnection::Open - Loaded image of oraocci12.dll, but unknown Machine %04x.",pocci->FileHeader->FileHeader.Machine); + } + } else { + CServerIo::trace(3,"COracleConnection::Open - Loaded image of oraocci12.dll, but no FileHeader."); + } + ImageUnload(pocci); + pocci=NULL; + } + + + + CServerIo::trace(3,"COracleConnection::Open - try and dynamically load oraocci12.dll"); + __try + #if (DELAYLOAD_VERSION >= 0x0200) || (_DELAY_IMP_VER > 1) + { + // __HrLoadAllImportsForDll() is defined in DelayImp.h, but not the + // one that is included in the PlatformSDK + #ifdef MYOWNIMPORT + if (FAILED(MHLoadAllImportsForDll("oraocci12.dll"))) + #else + if (FAILED(__HrLoadAllImportsForDll("oraocci12.dll"))) + #endif + { + CServerIo::trace(3,"COracleConnection::Open - Couldn't find oraocci12.dll"); + } + } + #else + #error Visual Studio 2003 required, and the Platform SDK include must be higher in the search order than the VC++ Include Directory $(VCInstallDir). + #endif + __except(EXCEPTION_EXECUTE_HANDLER) + { + CServerIo::trace(3,"COracleConnection::Open - Couldn't find oraocci12.dll (exception)"); + } + // end of stuff for Oracle 11 + } + #endif + /***********************/ CServerIo::trace(3,"COracleConnection::Open - try and ImageLoad oci.dll, so we can check it is in the PATH and if it is x32 or x64"); *************** *** 1420,1427 **** #endif break; case CSqlVariant::vtWString: ! CServerIo::trace(3," ::_Execute - Bind vtWString \"%s\" pos=%d",i->second,i->first+1); ! m_sqlv[i->first].ws=cvs::wide(i->second); if(!CheckError(m_hErr,OCIBindByPos(hStmt,&hBind, m_hErr, i->first+1, (void*)m_sqlv[i->first].ws.data(), (sb4)m_sqlv[i->first].ws.length()*sizeof(wchar_t), SQLT_CHR, 0, 0, 0, 0, 0, OCI_DEFAULT))) { OCIHandleFree(hStmt,OCI_HTYPE_STMT); --- 1488,1497 ---- #endif break; case CSqlVariant::vtWString: ! fldstr=cvs::string(i->second); ! wfldstr=cvs::wide(fldstr.c_str()); ! CServerIo::trace(3," ::_Execute - Bind vtWString \"%s\" pos=%d",fldstr.c_str(),i->first+1); ! m_sqlv[i->first].ws=wfldstr; if(!CheckError(m_hErr,OCIBindByPos(hStmt,&hBind, m_hErr, i->first+1, (void*)m_sqlv[i->first].ws.data(), (sb4)m_sqlv[i->first].ws.length()*sizeof(wchar_t), SQLT_CHR, 0, 0, 0, 0, 0, OCI_DEFAULT))) { OCIHandleFree(hStmt,OCI_HTYPE_STMT); *************** *** 1488,1493 **** --- 1558,1566 ---- #endif #if (OCI_MAJOR_VERSION == 11) m_versionString = "Oracle (client 11g)"; + #endif + #if (OCI_MAJOR_VERSION == 12) + m_versionString = "Oracle (client 12c)"; #endif #else m_versionString = "Oracle 9i/10g (client 8i or 9i)"; Index: cvsapi/oracle/OracleRecordset.cpp =================================================================== RCS file: /cvs/cvsnt/cvsapi/oracle/OracleRecordset.cpp,v retrieving revision 1.1.2.15.2.1 diff -c -r1.1.2.15.2.1 OracleRecordset.cpp *** cvsapi/oracle/OracleRecordset.cpp 29 Apr 2010 05:26:36 -0000 1.1.2.15.2.1 --- cvsapi/oracle/OracleRecordset.cpp 20 Feb 2020 04:17:25 -0000 *************** *** 97,103 **** --- 97,111 ---- #ifdef _WIN32 #ifdef OCI_MAJOR_VERSION + #if (OCI_MAJOR_VERSION == 10) #pragma comment(lib, "oraocci10") + #endif + #if (OCI_MAJOR_VERSION == 11) + #pragma comment(lib, "oraocci11") + #endif + #if (OCI_MAJOR_VERSION == 12) + #pragma comment(lib, "oraocci12") + #endif #pragma comment(lib, "oci") //#pragma comment(linker, "/DELAYLOAD:\"oci.dll\"") //#pragma comment(linker, "/DELAYLOAD:\"oraocci10.dll\"")