Skip to content

Improve handling of SQL warnings #126

@rikedyp

Description

@rikedyp

Use SQA.GetWarning to get the actual content of warnings and print to session.

     msgCatch msg;en;w
      enmsg
      :If 0<en        Server error if database operation fails
          {}SQA.Close cur
          :If 2006=2 2msg    SQL server has gone away
              Debug'> SQL SERVER WAS AWAY FOR QUERY: ',⎕TS
              SQA.Close db
              Connect ##.GetEnv¨'SQL_DATABASE' 'SQL_PASSWORD' 'SQL_USER'
          :Else
              (3msg)⎕SIGNAL 500
          :EndIf
      :ElseIf 0>en
          msg2 1SQA.GetWarning cur    Print and pass on warning
      :EndIf
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions