com.sap.sql

Class NoDataException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.sql.SQLException
              extended by com.sap.sql.NoDataException
All Implemented Interfaces:
Serializable, Iterable<Throwable>

public class NoDataException
extends SQLException

Exception thrown by the Open SQL / SQLJ runtime if a single row query returns an empty result set.

Typical use:

 
  try {
     #sql [ctx] { SELECT col INTO :var FROM dbtab };
  } catch (com.sap.sql.NoDataDataException ex) {
     // no data returned by the query
  } catch (com.sap.sql.CardinalityViolationException ex) {
     more than one row returned by the query
  }
  <pre>
 

See Also:
CardinalityViolationException, Serialized Form

Field Summary
static String SQL_STATE
          SQL state indicating that no data was returned by a single row query.
 
Constructor Summary
NoDataException()
          Constructs a new NoDataException object.
 
Method Summary
 
Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, getSQLState, iterator, setNextException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SQL_STATE

public static final String SQL_STATE
SQL state indicating that no data was returned by a single row query.

See Also:
Constant Field Values
Constructor Detail

NoDataException

public NoDataException()
Constructs a new NoDataException object. This is an SQLException with SQL state "02000" and the text "no data".

Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] ENGINEAPI [sap.com] opensqldeprecated default BC-JAS-PER-SQL
[sap.com] CORE-TOOLS [sap.com] com.sap.engine.client.libdeprecated default BC-JAS
[sap.com] ENGFACADE [sap.com] tc/je/opensql/api api BC-JAS


Copyright 2012 SAP AG Complete Copyright Notice