Home | Previous Page | Next Page   Working with Opaque Types > Creating Opaque Types and UDRs >

Removing UDRs and JAR Files

You can remove UDRs using the following methods:

public void removeUDR(String sqlname) throws SQLException
public void removeJar(String jarfilesqlname, int undeploy) throws
   SQLException

Tip:
The removeUDR() method removes the UDR from the server but does not remove the JAR file, because other opaque types or UDRs could be using the same JAR file.

The removeJar() method is described in Removing Opaque Types and JAR Files.

Removing 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} );
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]