FileDocCategorySizeDatePackage
CallTestDefaultConnection2.javaAPI DocExample574Sat Oct 28 16:27:28 BST 2000None

CallTestDefaultConnection2

public class CallTestDefaultConnection2 extends Object

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

  DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
  Connection conn = DriverManager.getConnection(
    "jdbc:oracle:thin:dssw2k01:1521:orcl", "scott", "tiger");
  CallableStatement cstmt = conn.prepareCall("{?= call TDC2_getGreeting}");
  cstmt.registerOutParameter(1, Types.CHAR);
  long rslt = cstmt.executeUpdate();
  if (rslt>0) 
   System.out.println(cstmt.getString(1));
  cstmt.close();
  conn.close();