Module com.microsoft.sqlserver.jdbc
Package com.microsoft.sqlserver.jdbc

## Interface ISQLServerMessage

All Known Implementing Classes:
  `SQLServerError`, `SQLServerInfoMessage`

    public interface ISQLServerMessage

Provides an interface SQLServerMessage

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`String` `getErrorMessage()` Returns error message as received from SQL Server
`int` `getErrorNumber()` Returns error number as received from SQL Server
`int` `getErrorSeverity()` Returns Severity of error (as int value) as received from SQL Server
`int` `getErrorState()` Returns error state as received from SQL Server
`long` `getLineNumber()` Returns line number where the error occurred in Stored Procedure returned by `getProcedureName()` as received from SQL Server
`String` `getProcedureName()` Returns name of the stored procedure where exception occurs as received from SQL Server
`String` `getServerName()` Returns name of the server where exception occurs as received from SQL Server
`SQLServerError` `getSQLServerMessage()` Returns SQLServerError containing detailed info about SQL Server Message as received from SQL Server.
`default boolean` `isErrorMessage()` Check if this is a isErrorMessage
`default boolean` `isInfoMessage()` Check if this is a SQLServerInfoMessage
`SQLException` `toSqlExceptionOrSqlWarning()` Creates a SQLServerException or SQLServerWarning from this SQLServerMessage

### Method Detail

#### getSQLServerMessage

    SQLServerError getSQLServerMessage()

Returns SQLServerError containing detailed info about SQL Server Message as received from SQL Server.

Returns:
  SQLServerError

#### getErrorMessage

    String getErrorMessage()

Returns error message as received from SQL Server

Returns:
  Error Message

#### getErrorNumber

    int getErrorNumber()

Returns error number as received from SQL Server

Returns:
  Error Number

#### getErrorState

    int getErrorState()

Returns error state as received from SQL Server

Returns:
  Error State

#### getErrorSeverity

    int getErrorSeverity()

Returns Severity of error (as int value) as received from SQL Server

Returns:
  Error Severity

#### getServerName

    String getServerName()

Returns name of the server where exception occurs as received from SQL Server

Returns:
  Server Name

#### getProcedureName

    String getProcedureName()

Returns name of the stored procedure where exception occurs as received from SQL Server

Returns:
  Procedure Name

#### getLineNumber

    long getLineNumber()

Returns line number where the error occurred in Stored Procedure returned by `getProcedureName()` as received from SQL Server

Returns:
  Line Number

#### toSqlExceptionOrSqlWarning

    SQLException toSqlExceptionOrSqlWarning()

Creates a SQLServerException or SQLServerWarning from this SQLServerMessage

Returns:
  - SQLServerException if it's a SQLServerError object
  - SQLServerWarning if it's a SQLServerInfoMessage object

#### isErrorMessage

    default boolean isErrorMessage()

Check if this is a isErrorMessage

Returns:
  true if it's an instance of SQLServerError

#### isInfoMessage

    default boolean isInfoMessage()

Check if this is a SQLServerInfoMessage

Returns:
  true if it's an instance of SQLServerInfoMessage