@@ -210,7 +210,7 @@ std::string DescribeChar(unsigned char ch) {
210210// Given a list of parameters and their ParamInfo, calls SQLBindParameter on each of them with
211211// appropriate arguments
212212SQLRETURN BindParameters (SQLHANDLE hStmt, const py::list& params,
213- const std::vector<ParamInfo>& paramInfos,
213+ std::vector<ParamInfo>& paramInfos,
214214 std::vector<std::shared_ptr<void >>& paramBuffers) {
215215 LOG (" Starting parameter binding. Number of parameters: {}" , params.size ());
216216 for (int paramIndex = 0 ; paramIndex < params.size (); paramIndex++) {
@@ -325,7 +325,7 @@ SQLRETURN BindParameters(SQLHANDLE hStmt, const py::list& params,
325325 &nullable
326326 );
327327 if (!SQL_SUCCEEDED (rc)) {
328- LOG (" SQLDescribeParam failed for parameter {}" , paramIndex);
328+ LOG (" SQLDescribeParam failed for parameter {} with error code {} " , paramIndex, rc );
329329 return rc;
330330 }
331331 sqlType = describedType;
@@ -336,9 +336,9 @@ SQLRETURN BindParameters(SQLHANDLE hStmt, const py::list& params,
336336 strLenOrIndPtr = AllocateParamBuffer<SQLLEN>(paramBuffers);
337337 *strLenOrIndPtr = SQL_NULL_DATA;
338338 bufferLength = 0 ;
339- const_cast <ParamInfo&>( paramInfo) .paramSQLType = sqlType;
340- const_cast <ParamInfo&>( paramInfo) .columnSize = columnSize;
341- const_cast <ParamInfo&>( paramInfo) .decimalDigits = decimalDigits;
339+ paramInfo.paramSQLType = sqlType;
340+ paramInfo.columnSize = columnSize;
341+ paramInfo.decimalDigits = decimalDigits;
342342 break ;
343343 }
344344 case SQL_C_STINYINT:
0 commit comments