当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: Result Sets from Stored Proced
 

 

 ·oracle数据库的空间管理技巧    »显示摘要«
    摘要: 在oracle数据库中,dba可以通过观测一定的表或视图来了解当前空间的使用状况,进而作出可能的调整决定。 ---- 一.表空间的自由空间 ---- 通过对表空间的自由空间的观察,可用来判断分配给某个表空间的空间是太多还是不够。请看下列的语句 sql > select a.file_id "fileno",a.tablespace_name "tablespace_name",......
 ·oracle数据库复制常用脚本    »显示摘要«
    摘要:oracle 数据库复制常用脚本(石骁騑 2001年07月30日 17:30) oracle的数据复制是一个oracle数据库产品中比较成熟的一项技术,它是整个分布式计算解决方案的一个重要组成部分。对于具有复制环境的数据库系统,和oracle dba一样,同样要有一个人来专门负责维护oracle的数据复制问题,称之为oracle replication administrator(oracle复......


ResultSetsfromStoredProceduresInOracle
上一页   ...    end; end-exec;     for( ;; )

    { 【程序编程相关:install mysql-standa

【推荐阅读:如何取消jakarta-tomcat-5

        exec sql whenever notfound do break; 【扩展信息:转:动态网页的搜索引擎优化

        exec sql fetch :my_cursor into :ename, empno;         printf( "%.*s, %d\n", ename.len, ename.arr, empno );

    }

    exec sql close :my_cursor;

}

and the java to use this could be:

 

import java.sql.*;

import java.io.*;

import oracle.jdbc.driver.*;

  class curvar

{

  public static void main (string args [])

                     throws sqlexception, classnotfoundexception

  {

      string driver_class = "oracle.jdbc.driver.oracledriver";

      string connect_string = "jdbc:oracle:thin:@slackdog:1521:oracle8";       string query = "begin :1 := sp_listemp; end;";

      connection conn;       class.forname(driver_class);

      conn = drivermanager.getconnection(connect_string, "scott", "tiger");       callablestatement cstmt = conn.preparecall(query);

      cstmt.registeroutparameter(1,oracletypes.cursor);

      cstmt.execute();

      resultset rset = (resultset)cstmt.getobject(1);       while (rset.next ())

        system.out.println( rset.getstring (1) );

      cstmt.close();

  }

}

 

the following is thanks to marktoml@hotmail.com (mark tomlinson)..

 

if you use odbc here is a working example, but it requires the use of the

8.0.5.2.0 or later oracle odbc driver, and an 8.0.5 server.

1) create a form with 1 text control (text1) and 1 list control (list1) and

    1 button (btnexecute).

2) the only code that you need is a click method on your button. here is the code.


...   下一页
 ·更改oracle数据库表的表空间    »显示摘要«
    摘要:更改oracle数据库表的表空间(石骁騑 2001年07月20日 17:56) 在oracle数据库管理系统中,创建库表(table)时要分配一个表空间(tablespace),如果未指定表空间,则使用系统用户确省的表空间。 在oracle实际应用中,我们可能会遇到这样的问题。处于性能或者其他方面的考虑,需要改变某个表或者是某个用户的所有表的表空间。通常的做法就是首先将表删除,然后重新建表,在......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE