From: Andrey <113546041+v1shnya@users.noreply.github.com> Date: Wed, 14 Dec 2022 20:45:12 +0000 (+0000) Subject: fix ColumnSize argument in SQLBindParameter #12324 X-Git-Tag: dnsdist-1.8.0-rc3~12^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecc07c9d71c64f7339f7a3027d7e61cd1e2b6fef;p=thirdparty%2Fpdns.git fix ColumnSize argument in SQLBindParameter #12324 --- diff --git a/modules/godbcbackend/sodbc.cc b/modules/godbcbackend/sodbc.cc index 3db686fcca..1857952fbb 100644 --- a/modules/godbcbackend/sodbc.cc +++ b/modules/godbcbackend/sodbc.cc @@ -93,13 +93,14 @@ public: { prepareStatement(); d_req_bind.push_back(p); + SQLLEN ColumnSize = (p.ParameterType == SQL_VARCHAR) ? *(p.LenPtr) : 0; SQLRETURN result = SQLBindParameter( d_statement, // StatementHandle, d_paridx + 1, // ParameterNumber, SQL_PARAM_INPUT, // InputOutputType, p.ValueType, // ValueType, p.ParameterType, // ParameterType, - 0, // ColumnSize, + ColumnSize, // ColumnSize, 0, // DecimalDigits, p.ParameterValuePtr, // ParameterValuePtr, 0, // BufferLength,