mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-02 14:03:41 +01:00
Binder::bind(BLOB)
This commit is contained in:
@@ -130,14 +130,7 @@ void Binder::bind(std::size_t pos, const Poco::Data::BLOB& val, Direction dir)
|
|||||||
{
|
{
|
||||||
SQLPOINTER pVal = 0;
|
SQLPOINTER pVal = 0;
|
||||||
SQLINTEGER size = (SQLINTEGER) val.size();
|
SQLINTEGER size = (SQLINTEGER) val.size();
|
||||||
SQLLEN* pLenIn = new SQLLEN;
|
|
||||||
*pLenIn = size;
|
|
||||||
|
|
||||||
if (PB_AT_EXEC == _paramBinding)
|
|
||||||
*pLenIn = SQL_LEN_DATA_AT_EXEC(size);
|
|
||||||
|
|
||||||
_lengthIndicator.push_back(pLenIn);
|
|
||||||
|
|
||||||
if (isOutBound(dir))
|
if (isOutBound(dir))
|
||||||
{
|
{
|
||||||
size = getParamSize(pos);
|
size = getParamSize(pos);
|
||||||
@@ -156,6 +149,14 @@ void Binder::bind(std::size_t pos, const Poco::Data::BLOB& val, Direction dir)
|
|||||||
else
|
else
|
||||||
throw IllegalStateException("Parameter must be [in] OR [out] bound.");
|
throw IllegalStateException("Parameter must be [in] OR [out] bound.");
|
||||||
|
|
||||||
|
SQLLEN* pLenIn = new SQLLEN;
|
||||||
|
*pLenIn = size;
|
||||||
|
|
||||||
|
if (PB_AT_EXEC == _paramBinding)
|
||||||
|
*pLenIn = SQL_LEN_DATA_AT_EXEC(size);
|
||||||
|
|
||||||
|
_lengthIndicator.push_back(pLenIn);
|
||||||
|
|
||||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||||
(SQLUSMALLINT) pos + 1,
|
(SQLUSMALLINT) pos + 1,
|
||||||
getParamType(dir),
|
getParamType(dir),
|
||||||
|
|||||||
Reference in New Issue
Block a user