mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-11-21 19:27:09 +01:00
Update POCO library.
This commit is contained in:
1 parent
8d15f4b6e9
commit
233fc103f9
2521 files changed
+257092
-72789
No files matched your search
+11
-8
@@ -15,6 +15,8 @@
|
||||
#include "Poco/Data/ODBC/ConnectionHandle.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include "Poco/Error.h"
|
||||
#include "Poco/Debugger.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
@@ -22,14 +24,14 @@ namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
ConnectionHandle::ConnectionHandle(EnvironmentHandle* pEnvironment):
|
||||
ConnectionHandle::ConnectionHandle(EnvironmentHandle* pEnvironment):
|
||||
_pEnvironment(pEnvironment ? pEnvironment : new EnvironmentHandle),
|
||||
_hdbc(SQL_NULL_HDBC),
|
||||
_hdbc(SQL_NULL_HDBC),
|
||||
_ownsEnvironment(pEnvironment ? false : true)
|
||||
{
|
||||
if (Utility::isError(SQLAllocHandle(SQL_HANDLE_DBC,
|
||||
_pEnvironment->handle(),
|
||||
&_hdbc)))
|
||||
if (Utility::isError(SQLAllocHandle(SQL_HANDLE_DBC,
|
||||
_pEnvironment->handle(),
|
||||
&_hdbc)))
|
||||
{
|
||||
throw ODBCException("Could not allocate connection handle.");
|
||||
}
|
||||
@@ -42,10 +44,11 @@ ConnectionHandle::~ConnectionHandle()
|
||||
{
|
||||
SQLDisconnect(_hdbc);
|
||||
SQLRETURN rc = SQLFreeHandle(SQL_HANDLE_DBC, _hdbc);
|
||||
|
||||
if (_ownsEnvironment) delete _pEnvironment;
|
||||
|
||||
poco_assert (!Utility::isError(rc));
|
||||
#if defined(_DEBUG)
|
||||
if (Utility::isError(rc))
|
||||
Debugger::enter(Poco::Error::getMessage(Poco::Error::last()), __FILE__, __LINE__);
|
||||
#endif
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user