Verify support for named parameters in a CallableStatement
The JDBC specification provides the DatabaseMetaData.supportsNamedParameters() method
to determine if the driver and the RDMS support named parameters in
a CallableStatement. For example:
Connection myConn = . . . // connection to the RDBMS for Database
. . .
DatabaseMetaData dbmd = myConn.getMetaData();
if (dbmd.supportsNamedParameters() == true)
{
System.out.println("NAMED PARAMETERS FOR CALLABLE"
+ "STATEMENTS IS SUPPORTED");
. . .
}
The system returns true if named parameters are supported.