Remove overloaded UDRs
To remove overloaded UDRs, use the removeUDR() method
with an additional parameter:
public void removeUDR(String sqlname, Class[] methodparams) throws SQLException
The methodparams parameter specifies the data type
of each parameter in the UDR. Specify NULL to indicate no parameters.
For example, assume a UDR named print() is overloaded
with two additional method signatures.
Java™ method signature | Corresponding SQL name |
---|---|
void print() | print1 |
void print(String x, String y, int r) | print2 |
void print(int a, int b) | print3 |
The code to remove all three UDRs is:
udrmgr.removeUDR("print1", null ); udrmgr.removeUDR("print2", new Class[] {String.class, String.class, int.class} ); udrmgr.removeUDR("print3", new Class[] {int.class, int.class} );