1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-05-11 05:27:13 +02:00
SqMod/vendor/POCO/Data/ODBC/src/Parameter.cpp
Sandu Liviu Catalin 4a6bfc086c Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface.
Deprecated the external module API. It was creating more problems than solving.
Removed most built-in libraries in favor of system libraries for easier maintenance.
Cleaned and secured code with help from static analyzers.
2021-01-30 08:51:39 +02:00

54 lines
834 B
C++

//
// Parameter.cpp
//
// Library: Data/ODBC
// Package: ODBC
// Module: Parameter
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Data/ODBC/Parameter.h"
#include "Poco/Data/ODBC/Utility.h"
#include "Poco/Data/ODBC/Error.h"
#include "Poco/Data/ODBC/ODBCException.h"
namespace Poco {
namespace Data {
namespace ODBC {
Parameter::Parameter(const StatementHandle& rStmt, std::size_t colNum) :
_rStmt(rStmt),
_number(colNum)
{
init();
}
Parameter::~Parameter()
{
}
void Parameter::init()
{
if (Utility::isError(SQLDescribeParam(_rStmt,
(SQLUSMALLINT) _number + 1,
&_dataType,
&_columnSize,
&_decimalDigits,
&_isNullable)))
{
throw StatementException(_rStmt);
}
}
} } } // namespace Poco::Data::ODBC