ODBC Issues

  • Creator
    Topic
  • #50739
    Aaron Markley
    Participant

      Hello,

      Our site has been using the ODBC module for connecting to an MSSQL database for several years now.

    Viewing 2 reply threads
    • Author
      Replies
      • #67320
        Jim Kosloskey
        Participant

          Aaron,

          We have only been using Data Integrator in Productin for a few months but have not experienced what you are experiencing.

          Having said that, I need to also mention we are not directly affecting the target database (SQL insert, etc.) instead, we invoke a Stored Procedure that does all of the DB work so this might be a case of Apples and Oranges.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #67321
          Charlie Bursell
          Participant

            See if this applies.  From 5.6 release notes

            8.2.1               SQLExecDirect issues

            ODBC programs using SQLExecDirect on statements with bound variables may crash the engine.

            The problem is related to an incorrect row set size. The row set size is specified with:

            odbc SQLSetStmtAttr $hstmt SQL_ATTR_PARAMSET_SIZE 1 0

            Where 1 is the size of the row set. If the size is 1, the bound variables are assumed to be scalars. If the size is greater than 1, the variables are assumed to be arrays.

            Using the wrong size will attempt to bind to a non-existent variable and cause a crash.

            The size should always default to 1 but there may be cases where it does not. If the SQLExecDirect statement has no row size set, force the row set size to 1 before executing the SQLExecDirect command.

            To work around the issue, force the row set size to 1 with the SQLSetStmtAttr statement shown above, before using the statement with bound variables.

          • #67322
            Aaron Markley
            Participant

              Adding the indicated statement (odbc SQLSetStmtAttr $hstmt SQL_ATTR_PARAMSET_SIZE 1 0) prior to the SQLExecDirect command doesn’t appear to resolve these malloc errors we are seeing.

          Viewing 2 reply threads
          • The forum ‘Cloverleaf’ is closed to new topics and replies.