Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Javaµ÷ÓÃOracleÊý¾Ý¿âµÄ·ÖÒ³´æ´¢¹ý³Ì

 ×î½üÏîÄ¿½ø¶È±È½Ï»ºÂý£¬³õ²½Ñо¿ÁËÒ»ÏÂOracleµÄ´æ´¢¹ý³Ì£¬½«´úÂëÌù³öÀ´¡£
 Ê×ÏÈÏÈÌù³öÀ´OracleµÄ·ÖÒ³·ÖÒ³´æ´¢¹ý³Ì´úÂë°É¡£
 1.ÕâÊǰüµÄ´úÂë
 create or replace package DB_Oper is
  -- Author  : LIUBING
  -- Created : 2009-10-28 15:01:30
  -- Purpose : ²âÊÔOracleµÄ·ÖÒ³´æ´¢¹ý³Ì
 
  -- Public type declarations
  type ref_DataSet is REF CURSOR;
  -- Public function and procedure declarations
  function GetCount(mTableName varchar2, mTerm varchar2) return number;
  procedure return_DataSet(
     mTableName in varchar2,    --±íÃû
     mTerm in varchar2,         --Ìõ¼þ
     mPageSize in number,       --ÿҳÏÔʾ¼Ç¼Êý
     mPageIndex in number,      --µ±Ç°Ò³
     mOrderField in varchar2,   --ÅÅÐò×Ö¶Î
     mOrderStyle in number,    --ÅÅÐò·½Ê½ 0 ÉýÐò 1 ½µÐò
     mTotalRecords out number,  --×ܼǼÊý
     mDateSet out ref_DataSet    --¼Ç¼
     );
end DB_Oper;
2.ÕâÊǰüÌåµÄ´úÂë
 create or replace package body DB_Oper is
 -----  »ñÈ¡¼Ç¼Êý  ------
  function GetCount(mTableName varchar2, mTerm varchar2) return number is
    i number;
    vSql varchar2(1000);
  begin
    i := 0;
    vSql := 'select count(*)  from ' || mTableName ;
    if length(mTerm) > 0 then
      vSql := vSql || ' where ' || mTerm;
    end if;
    execute IMMEDIATE  vSql into i;
    return(i);
  end;
  -----  Êý¾Ý·ÖÒ³  ----------
  procedure return_DataSet(
  &n


Ïà¹ØÎĵµ£º

oracle tnsnames.oraÅäÖÃС½á

listener.ora¡¢ tnsnames.oraºÍsqlnet.oraÕâ3¸öÎļþÊǹØÏµoracleÍøÂçÅäÖõÄ3¸öÖ÷ÒªÎļþ£¬ÆäÖÐlistener.oraÊǺÍÊý¾Ý¿â·þÎñÆ÷¶Ë Ïà¹Ø£¬¶øtnsnames.oraºÍsqlnet.oraÕâ2¸öÎļþ²»½ö½ö¹ØÏµµ½·þÎñÆ÷¶Ë£¬Ö÷ÒªµÄ»¹ÊǺͿͻ§¶Ë¹ØÏµ½ôÃÜ¡£
¼ì²é¿Í»§¶ËoracleÍøÂçµÄʱºò¿ÉÒÔÏȼì²ésqlnet.oraÎļþ£º
# SQLNET.ORA Network Configuration ......

ÈçºÎ½«TXT,EXCEL»òCSVÊý¾Ýµ¼ÈëORACLEµ½¶ÔÓ¦±íÖÐ

 ·½·¨Ò»£¬Ê¹ÓÃSQL*Loader  
  Õâ¸öÊÇÓõĽ϶àµÄ·½·¨£¬Ç°Ìá±ØÐëoracleÊý¾ÝÖÐÄ¿µÄ±íÒѾ­´æÔÚ¡£  
  ´óÌå²½ÖèÈçÏ£º  
  1   ½«excleÎļþÁí´æÎªÒ»¸öÐÂÎļþ±ÈÈçÎļþÃûΪtext.txt£¬ÎļþÀàÐÍÑ¡Îı¾Îļþ£¨ÖƱí·û·Ö¸ô£©£¬ÕâÀïÑ¡ÔñÀàÐÍΪcsv£¨¶ººÅ·Ö¸ô£©Ò²ÐУ¬µ«ÊÇÔÚдºóÃæµÄcontrol. ......

Oracleѧϰ±Ê¼Çժ¼6


  declare
  begin
   --SQLÓï¾ä
   --Ö±½ÓдµÄSQLÓï¾ä(DML/TCL)
   --¼ä½Óдexecute immediate <DDL/DCLÃüÁî×Ö·û´®>
   --select Óï¾ä
        <1>±ØÐë´øÓÐinto×Ó¾ä
      &n ......

Java¹Ø¼ü×Öfinal¡¢staticʹÓÃ×ܽá

 
Ò»¡¢final

¡¡¸ù¾Ý³ÌÐòÉÏÏÂÎÄ»·¾³£¬Java
¹Ø¼ü×ÖfinalÓГÕâÊÇÎÞ·¨¸Ä±äµÄ”»òÕß“ÖÕ̬µÄ”º¬Ò壬Ëü¿ÉÒÔÐÞÊηdzéÏóÀà¡¢·Ç³éÏóÀà³ÉÔ±·½·¨ºÍ±äÁ¿¡£Äã¿ÉÄܳöÓÚÁ½ÖÖÀí½â¶øÐèÒª×èÖ¹¸Ä±ä£ºÉè¼Æ»òЧÂÊ¡£
finalÀ಻Äܱ»¼Ì³Ð£¬Ã»ÓÐ×ÓÀ࣬finalÀàÖеķ½·¨Ä¬ÈÏÊÇfinalµÄ¡£
final·½·¨²»Äܱ»×ÓÀàµÄ·½· ......

javaÐĵã¡

 javaÐĵã¡--ºÜºÃµÄjavaѧϰÀú³Ì£¨×ª×ÔÕŹú±¦£© ÊÕ²Ø ´ËÎÄÓÚ2009-10-26±»ÍƼöµ½CSDNÊ×Ò³
ÈçºÎ±»ÍƼö£¿
1.    Êý×éÓÐûÓÐlength()Õâ¸ö·½·¨? StringÓÐûÓÐlength()Õâ¸ö·½·¨£¿
        ´ð£ºÊý×éûÓÐlength()Õâ¸ö·½·¨£¬ÓÐlengthµÄÊôÐÔ¡£
     ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ