mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-18 00:15:27 +01:00
- removed position parameter to setParamSetSize() (not used)
- execute call in SQLChannel wrapped in try-catch
This commit is contained in:
parent
10f9d4befb
commit
eeb285bb93
@ -403,7 +403,7 @@ private:
|
||||
SQLINTEGER colSize = 0;
|
||||
SQLSMALLINT decDigits = 0;
|
||||
getColSizeAndPrecision(pos, cDataType, colSize, decDigits);
|
||||
setParamSetSize(pos, length);
|
||||
setParamSetSize(length);
|
||||
|
||||
if (_vecLengthIndicator.size() <= pos)
|
||||
{
|
||||
@ -455,7 +455,7 @@ private:
|
||||
SQLSMALLINT decDigits = 0;
|
||||
getColSizeAndPrecision(pos, cDataType, colSize, decDigits);
|
||||
|
||||
setParamSetSize(pos, val.size());
|
||||
setParamSetSize(val.size());
|
||||
|
||||
if (_vecLengthIndicator.size() <= pos)
|
||||
{
|
||||
@ -500,7 +500,7 @@ private:
|
||||
if (0 == val.size())
|
||||
throw InvalidArgumentException("Empty container not allowed.");
|
||||
|
||||
setParamSetSize(pos, val.size());
|
||||
setParamSetSize(val.size());
|
||||
|
||||
SQLINTEGER size = 0;
|
||||
getColumnOrParameterSize(pos, size);
|
||||
@ -564,7 +564,7 @@ private:
|
||||
if (0 == val.size())
|
||||
throw InvalidArgumentException("Empty container not allowed.");
|
||||
|
||||
setParamSetSize(pos, val.size());
|
||||
setParamSetSize(val.size());
|
||||
|
||||
SQLINTEGER size = 0;
|
||||
|
||||
@ -628,7 +628,7 @@ private:
|
||||
if (0 == val.size())
|
||||
throw InvalidArgumentException("Empty vector not allowed.");
|
||||
|
||||
setParamSetSize(pos, val.size());
|
||||
setParamSetSize(val.size());
|
||||
|
||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_DATE_STRUCT);
|
||||
|
||||
@ -672,7 +672,7 @@ private:
|
||||
if (0 == val.size())
|
||||
throw InvalidArgumentException("Empty container not allowed.");
|
||||
|
||||
setParamSetSize(pos, val.size());
|
||||
setParamSetSize(val.size());
|
||||
|
||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_TIME_STRUCT);
|
||||
|
||||
@ -716,7 +716,7 @@ private:
|
||||
if (0 == val.size())
|
||||
throw InvalidArgumentException("Empty Containers not allowed.");
|
||||
|
||||
setParamSetSize(pos, val.size());
|
||||
setParamSetSize(val.size());
|
||||
|
||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_TIMESTAMP_STRUCT);
|
||||
|
||||
@ -760,7 +760,7 @@ private:
|
||||
if (0 == val.size())
|
||||
throw InvalidArgumentException("Empty container not allowed.");
|
||||
|
||||
setParamSetSize(pos, val.size());
|
||||
setParamSetSize(val.size());
|
||||
|
||||
SQLINTEGER size = SQL_NULL_DATA;
|
||||
|
||||
@ -801,7 +801,7 @@ private:
|
||||
/// to discover the required values are unsuccesfully exhausted, the values
|
||||
/// are both set to zero and no exception is thrown.
|
||||
|
||||
void setParamSetSize(std::size_t pos, std::size_t length);
|
||||
void setParamSetSize(std::size_t length);
|
||||
/// Sets the parameter set size. Used for column-wise binding.
|
||||
|
||||
void getColumnOrParameterSize(std::size_t pos, SQLINTEGER& size);
|
||||
|
@ -515,7 +515,7 @@ void Binder::getColumnOrParameterSize(std::size_t pos, SQLINTEGER& size)
|
||||
}
|
||||
|
||||
|
||||
void Binder::setParamSetSize(std::size_t pos, std::size_t length)
|
||||
void Binder::setParamSetSize(std::size_t length)
|
||||
{
|
||||
if (0 == _paramSetSize)
|
||||
{
|
||||
|
@ -142,7 +142,14 @@ void SQLChannel::logSync(const Message& msg)
|
||||
_dateTime = msg.getTime();
|
||||
if (_source.empty()) _source = _name;
|
||||
|
||||
_pLogStatement->execute();
|
||||
try
|
||||
{
|
||||
_pLogStatement->execute();
|
||||
}
|
||||
catch (Exception&)
|
||||
{
|
||||
if (_throw) throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user