易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle连接数据库测试代码

oracle连接数据库测试代码
/**
*
* 说明:
* (1)本例使用JDBC_ODBC桥进行数据库连接,故此需要ODBC数据源
* (2)本例中SQL为更新语句,故此使用载体的executeUpdate方法,并且返回受影响记录数
* (3) 配置连接ORACLE的odbc数据源ora
*/
//导入所需类包
import java.sql.*;
public class JdbcTestOra2 {
public static void main(String args[]) {
    try {
      //装载驱动程序
      Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
     
      //建立数据库连接
      Connection con =
DriverManager.getConnection("jdbc:odbc:ora","scott","tiger");
     
      //创建SQL语句载体
      Statement st = con.createStatement();
     
      //执行SQL语句,接收执行结果
      int rs = st.executeUpdate("update emp set
comm=1000");
           
      //处理结果
      System.out.println("修改记录数:"+rs);
     
      //释放数据库资源,注意顺序
      st.close();
      con.close();           
    }
    catch (Exception e) {
      e.printStackTrace(System


相关文档:

windows 启动 oracle 批处理脚本

 Oracle安装后,会把4个服务设为自动启动,分别为:
1. OracleOraHome90Agent
2. OracleOraHome90HTTPServer
3. OracleOraHome90TNSListener
4. OracleServiceORA
         其中第二个不是必须的,可以在服务里把它禁用。其他三个在Oracle运行时都要启动。
   ......

Oracle & SUN,严峻的挑战(一)

      今天参加了Oracle & SUN合并后第一次与合作伙伴及客户的通气会。整个会议给我的感觉是:Oracle雄心勃勃,SUN意气风发,而我自己,心怀惴惴。       Oracle有了SUN,那么从硬件到软件Oracle的产品线就十分齐备了。Oracle半年前推出11gR2 for linux,接着for solar ......

一个programmer关于Oracle SQL的学习小结与思考

http://www.javaeye.com/topic/366991#
作为一个开发人员,开始认真系统学习
Oracle SQL也只有月余,之前的
SQL知
识仅仅是项目里面用到什么就去看什么,简单说就是
Read The Fxxking Guide。在系统学习
Oracle
SQL之前,俺的想法就是“按照需求完成功能,剩下的交给
DBA来处理”。这个想法从整体来看显 ......

Oracle wait problems and potential solutions

Wait Problem Potential Fix Sequential Read Indicates many index reads—tune the code (especially joins) Scattered Read Indicates many full table scans—tune the code; cache small tables ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号