Mercurial > hg > orthanc-databases
comparison Odbc/Plugins/IndexPlugin.cpp @ 331:674bbb9d1c83
added OdbcEnvironment::GlobalInitialization()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 11 Aug 2021 07:28:53 +0200 |
parents | b5fb8b77ce4d |
children | fad7c6156923 |
comparison
equal
deleted
inserted
replaced
330:8f17f23c9af7 | 331:674bbb9d1c83 |
---|---|
19 **/ | 19 **/ |
20 | 20 |
21 | 21 |
22 #include "OdbcIndex.h" | 22 #include "OdbcIndex.h" |
23 | 23 |
24 #include "../../Framework/Odbc/OdbcEnvironment.h" | |
24 #include "../../Framework/Plugins/PluginInitialization.h" | 25 #include "../../Framework/Plugins/PluginInitialization.h" |
25 #include "../../Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h" | 26 #include "../../Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h" |
26 | 27 |
27 #include <Logging.h> | 28 #include <Logging.h> |
28 | 29 |
82 LOG(WARNING) << "The ODBC index is currently disabled, set \"EnableIndex\" " | 83 LOG(WARNING) << "The ODBC index is currently disabled, set \"EnableIndex\" " |
83 << "to \"true\" in the \"" << KEY_ODBC << "\" section of the configuration file of Orthanc"; | 84 << "to \"true\" in the \"" << KEY_ODBC << "\" section of the configuration file of Orthanc"; |
84 return 0; | 85 return 0; |
85 } | 86 } |
86 | 87 |
88 OrthancDatabases::OdbcEnvironment::GlobalInitialization(); | |
89 | |
87 try | 90 try |
88 { | 91 { |
89 const std::string connectionString = odbc.GetStringValue("IndexConnectionString", ""); | 92 const std::string connectionString = odbc.GetStringValue("IndexConnectionString", ""); |
90 const unsigned int countConnections = odbc.GetUnsignedIntegerValue("IndexConnectionsCount", 1); | 93 const unsigned int countConnections = odbc.GetUnsignedIntegerValue("IndexConnectionsCount", 1); |
91 const unsigned int maxConnectionRetries = odbc.GetUnsignedIntegerValue("MaxConnectionRetries", 10); | 94 const unsigned int maxConnectionRetries = odbc.GetUnsignedIntegerValue("MaxConnectionRetries", 10); |