-
Bug
-
Resolution: Fixed
-
P2
-
6
-
b59
-
generic
-
generic
-
Verified
JDK : 1.6-b54
DB : orcl, mssql
Platform[s] : solaris, windows, linux
All of the DataSet methods that are supposed to be throwing SQLRuntimeException (according to the API spec), throw SQLException instead and require that SQLException must be caught or thrown. They do not yet throw SQLRuntimeException. Code will not compile unless SQLException is caught or thrown.
Methods:
========
asRowSet()
getRow()
insert(T row)
modify(T row)
modify()
delete()
close()
isReadOnly()
isConnected()
isScrollable()
getWarnings()
clearWarnings()
Sample Code:
============
DataSet rows = mq.getAllMammals();
Mammal newMammal = new Mammal();
try {
rows.insert(newMammal);
} catch (SQLRuntimeException ex) {
System.out.println("Error!");
}
Output:
=======
unreported exception java.sql.SQLException; must be caught or declared to be thrown
rows.insert(newMammal);
^
1 error
DB : orcl, mssql
Platform[s] : solaris, windows, linux
All of the DataSet methods that are supposed to be throwing SQLRuntimeException (according to the API spec), throw SQLException instead and require that SQLException must be caught or thrown. They do not yet throw SQLRuntimeException. Code will not compile unless SQLException is caught or thrown.
Methods:
========
asRowSet()
getRow()
insert(T row)
modify(T row)
modify()
delete()
close()
isReadOnly()
isConnected()
isScrollable()
getWarnings()
clearWarnings()
Sample Code:
============
DataSet rows = mq.getAllMammals();
Mammal newMammal = new Mammal();
try {
rows.insert(newMammal);
} catch (SQLRuntimeException ex) {
System.out.println("Error!");
}
Output:
=======
unreported exception java.sql.SQLException; must be caught or declared to be thrown
rows.insert(newMammal);
^
1 error