- removed position parameter to setParamSetSize() (not used)

- execute call in SQLChannel wrapped in try-catch
This commit is contained in:
Aleksandar Fabijanic 2008-02-06 02:29:09 +00:00
parent 10f9d4befb
commit eeb285bb93
3 changed files with 18 additions and 11 deletions

View File

@ -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);

View File

@ -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)
{

View File

@ -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;
}
}