ODBC SQLExecute limitation

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf ODBC SQLExecute limitation

  • Creator
    Topic
  • #53474
    Brian Sweetland
    Participant

      I recently had an issue with running server Stored Procedures via ODBC inside a TCL proc and found a solution, but not sure I understand the issue as I

    Viewing 1 reply thread
    • Author
      Replies
      • #77797
        David Barr
        Participant

          It’s helpful to call SQLGetDiagRec after each error to get the reason for the failure. Your assumption about a byte limit may be incorrect. If you get the error messages then you don’t have to make any assumptions.

        • #77798
          Brian Sweetland
          Participant

            Added this line.

            if { ($err == “SQL_ERROR”) || ($err == “SQL_ERROR_WITH_INFO”) } {

            lappend logFileOutputMsg ”  ERROR while Executing SQL Stored Procedure…$SQLCmd”

            set err2 [odbc SQLGetDiagRec SQL_HANDLE_STMT $hstmt 1 SqlState NativeError MessageText 511 TextLength]

            lappend logFileOutputMsg ”    SqlState>$SqlState<…"

            lappend logFileOutputMsg ”    NativeError>$NativeError<…"

            lappend logFileOutputMsg ”    MessageText>$MessageText<…"

            }

            This was the response from first Error.

            SqlState>HY000<…

            NativeError>0<…

            MessageText>[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt<…

            Based on the

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