Using Callable Statements

The third kind of statement that Java supports is a CallableStatement, which supports stored procedures. Because InstantDB does not (as of September 1999) support stored procedures, I will show you a code snippet that you can modify to work with stored procedures in your code. The format for stored procedures varies from vendor to vendor, so you should check your DBMS vendor's documentation to see how to use a stored procedure from Java. As noted earlier, a stored procedure is a set of SQL statements stored in the database itself.

Note

Some vendors, notably Oracle, are adding support for coding stored procedures in Java, but this is not supported widely yet. In Oracle's case, there is a JVM embedded in the database engine. ...

Get PURE Java™ 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.