The following section tells how to create a UDR from a Java class.
For more information, see Requirements for the Java Class.
For information about creating an sbspace, see the Administrator's Guide for your database server and the IBM Informix: J/Foundation Developer's Guide.
Make sure the connection object has a database object associated with it. For details, see Connecting to the Database.
UDRManager udrmgr = new UDRManager(myConn); UDRMetaData mdata = new UDRMetaData();
Class gp1 = Class.forName("Group1"); Method method1 = gp1.getMethod("udr1", new Class[]{String.class, String.class}); Method method2 = gp1.getMethod("udr2", new Class[]{Integer.class, String.class, String.class});
The second parameter specifies the SQL name of the UDR:
mdata.setUDR(method1, "group1_udr1"); mdata.setUDR(method2, "group1_udr2");
For more information, see Creating UDRs.
mdata.setJarFileSQLName("group1_jar");
String pathname = "/work/srv93/examples"; udrmgr.setJarFileTmpPath(pathname);
Make sure the path exists in the database server file system. For more information, see Specifying a JAR File Temporary Path.
udrmgr.createUDRs(mdata, "Group1.jar", "Group1", 0);
For more information, see Creating UDRs.
For complete code examples of creating UDRs, see Creating UDRs with UDRManager.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]