ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Sqlcod = -000000404

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sqlcod = -000000404

    Hi,

    Anyone is aware about the SQLCOD = -000000404.
    Someone please let me know the purpose of this SQL code?

    Thanks,
    Ranjini

  • #2
    Re: Sqlcod = -000000404

    There is a sticky at the top of this forum with many, many, many, many, wonderful (police academy) ways of finding it. Here's the manual
    Attached Files
    Last edited by kitvb1; February 23, 2010, 04:19 AM.
    Regards

    Kit
    http://www.ecofitonline.com
    DeskfIT - ChangefIT - XrefIT
    ___________________________________
    There are only 3 kinds of people -
    Those that can count and those that can't.

    Comment


    • #3
      Re: Sqlcod = -000000404

      Hi,
      Copy pasting from Publib..

      SQL0404
      Message Text: Value for column or variable &1 too long.
      Cause Text: An INSERT or UPDATE statement or a SET or VALUES INTO statement or a GET DIAGNOSTICS statement specifies a value that is longer than the maximum length string that can be stored in &1. The length of &1 is &2 and the length of the string is &3.
      Recovery Text: Reduce the length of the string from &3 to a maximum of &2 and try the request again.
      SQLCODE or SQLCODEs: -404
      SQLSTATE or SQLSTATEs: 22001

      Comment


      • #4
        Re: Sqlcod = -000000404

        for SQL

        SQLCOD = 0 --> No Error
        SQLCOD = 100 --> Not Record Found
        SQLCOD = 1 - 99 --> Warnings Message
        SQLCOD < 0 --> Errors

        To get the Error-Message you could look into the QSQLMSG -Messge file.
        for example:
        SQLCOD -104 --> Message-Id SQL0104


        to see the error message u can include this sql statement:

        EXEC SQL Get Diagnostics Condition 1 :msgt = MESSAGE_TEXT

        where msgt is host variable.
        Young people knows how to run fast but old people knows the way..

        Comment


        • #5
          Re: Sqlcod = -000000404

          FWIW, I read yesterday that IBM recommends using SQLSTATE and not SQLCOD - to do with ANSI standards.
          Regards

          Kit
          http://www.ecofitonline.com
          DeskfIT - ChangefIT - XrefIT
          ___________________________________
          There are only 3 kinds of people -
          Those that can count and those that can't.

          Comment

          Working...
          X