com.ibm.as400.access

Class AS400JDBCSQLSyntaxErrorException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.sql.SQLException
          • com.ibm.as400.access.AS400JDBCSQLSyntaxErrorException
  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<java.lang.Throwable>


    public class AS400JDBCSQLSyntaxErrorException
    extends java.sql.SQLException

    The AS400JDBCSQLSyntaxErrorException class provides additional information about SQL Syntax Errors thrown by the database. In particular, the method getPositionOfSyntaxError returns the position, if available, of where the syntax error occurred in the original SQL statement. The exception also includes the original SQL statement that encountered the error.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      AS400JDBCSQLSyntaxErrorException(int locationOfSyntaxError, java.lang.String sqlStatementText)
      Constructs a AS400JDBCSQLSyntaxErrorException object.
      AS400JDBCSQLSyntaxErrorException(java.lang.String reason, int locationOfSyntaxError, java.lang.String sqlStatementText)
      Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason.
      AS400JDBCSQLSyntaxErrorException(java.lang.String reason, java.lang.String SQLState, int vendorCode, int locationOfSyntaxError, java.lang.String sqlStatementText)
      Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason, SQLState and vendorCode.
      AS400JDBCSQLSyntaxErrorException(java.lang.String reason, java.lang.String SQLState, int locationOfSyntaxError, java.lang.String sqlStatementText)
      Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason and SQLState.
      AS400JDBCSQLSyntaxErrorException(java.lang.String reason, java.lang.String sqlState, int vendorCode, java.lang.Throwable cause, int locationOfSyntaxError, java.lang.String sqlStatementText)
      Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason, SQLState, vendorCode and cause.
      AS400JDBCSQLSyntaxErrorException(java.lang.String reason, java.lang.String sqlState, java.lang.Throwable cause, int locationOfSyntaxError, java.lang.String sqlStatementText)
      Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason, SQLState and cause.
      AS400JDBCSQLSyntaxErrorException(java.lang.String reason, java.lang.Throwable cause, int locationOfSyntaxError, java.lang.String sqlStatementText)
      Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason and cause.
      AS400JDBCSQLSyntaxErrorException(java.lang.Throwable cause, int locationOfSyntaxError, java.lang.String sqlStatementText)
      Constructs a AS400JDBCSQLSyntaxErrorException object with a given cause.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      int getLocationOfSyntaxError()
      returns the location of the syntax error, if available.
      java.lang.String getMessage() 
      java.lang.String getSqlStatementText()
      returns the sql statement text which encountered the error, if available.
      • Methods inherited from class java.sql.SQLException

        getErrorCode, getNextException, getSQLState, iterator, setNextException
      • Methods inherited from class java.lang.Throwable

        fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AS400JDBCSQLSyntaxErrorException

        public AS400JDBCSQLSyntaxErrorException(int locationOfSyntaxError,
                                        java.lang.String sqlStatementText)
        Constructs a AS400JDBCSQLSyntaxErrorException object.
        Parameters:
        locationOfSyntaxError -
        sqlStatementText -
      • AS400JDBCSQLSyntaxErrorException

        public AS400JDBCSQLSyntaxErrorException(java.lang.String reason,
                                        int locationOfSyntaxError,
                                        java.lang.String sqlStatementText)
        Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason.
        Parameters:
        reason -
        locationOfSyntaxError -
        sqlStatementText -
      • AS400JDBCSQLSyntaxErrorException

        public AS400JDBCSQLSyntaxErrorException(java.lang.String reason,
                                        java.lang.String SQLState,
                                        int locationOfSyntaxError,
                                        java.lang.String sqlStatementText)
        Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason and SQLState.
        Parameters:
        reason -
        SQLState -
        locationOfSyntaxError -
        sqlStatementText -
      • AS400JDBCSQLSyntaxErrorException

        public AS400JDBCSQLSyntaxErrorException(java.lang.String reason,
                                        java.lang.String SQLState,
                                        int vendorCode,
                                        int locationOfSyntaxError,
                                        java.lang.String sqlStatementText)
        Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason, SQLState and vendorCode.
        Parameters:
        reason -
        SQLState -
        vendorCode -
        locationOfSyntaxError -
        sqlStatementText -
      • AS400JDBCSQLSyntaxErrorException

        public AS400JDBCSQLSyntaxErrorException(java.lang.String reason,
                                        java.lang.String sqlState,
                                        int vendorCode,
                                        java.lang.Throwable cause,
                                        int locationOfSyntaxError,
                                        java.lang.String sqlStatementText)
        Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason, SQLState, vendorCode and cause.
        Parameters:
        reason -
        sqlState -
        vendorCode -
        cause -
        locationOfSyntaxError -
        sqlStatementText -
      • AS400JDBCSQLSyntaxErrorException

        public AS400JDBCSQLSyntaxErrorException(java.lang.String reason,
                                        java.lang.String sqlState,
                                        java.lang.Throwable cause,
                                        int locationOfSyntaxError,
                                        java.lang.String sqlStatementText)
        Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason, SQLState and cause.
        Parameters:
        reason -
        sqlState -
        cause -
        locationOfSyntaxError -
        sqlStatementText -
      • AS400JDBCSQLSyntaxErrorException

        public AS400JDBCSQLSyntaxErrorException(java.lang.String reason,
                                        java.lang.Throwable cause,
                                        int locationOfSyntaxError,
                                        java.lang.String sqlStatementText)
        Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason and cause.
        Parameters:
        reason -
        cause -
        locationOfSyntaxError -
        sqlStatementText -
      • AS400JDBCSQLSyntaxErrorException

        public AS400JDBCSQLSyntaxErrorException(java.lang.Throwable cause,
                                        int locationOfSyntaxError,
                                        java.lang.String sqlStatementText)
        Constructs a AS400JDBCSQLSyntaxErrorException object with a given cause.
        Parameters:
        cause -
        locationOfSyntaxError -
        sqlStatementText -
    • Method Detail

      • getLocationOfSyntaxError

        public int getLocationOfSyntaxError()
        returns the location of the syntax error, if available. Returns 0 if the location is not available.
        Returns:
        location of the syntax error
      • getSqlStatementText

        public java.lang.String getSqlStatementText()
        returns the sql statement text which encountered the error, if available. returns null if the statement is not available.
        Returns:
        sql statement text for the error
      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable