FileDocCategorySizeDatePackage
PublishTestInternalConnection.javaAPI DocExample746Sat Oct 28 16:27:04 BST 2000None

PublishTestInternalConnection

public class PublishTestInternalConnection extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)

  DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
  String sql = "create or replace function TIC_getGreeting " + 
               "return varchar2 " + 
               "as language java " + 
               "name 'TestInternalConnection.getGreeting() " + 
               "return java.lang.String';";
  Connection conn = DriverManager.getConnection(
    "jdbc:oracle:thin:dssw2k01:1521:orcl", "scott", "tiger");
  Statement  stmt = conn.createStatement(); 
  long       rslt = stmt.executeUpdate(sql);
  if (rslt==0) 
   System.out.println("OK");
  stmt.close();
  conn.close();