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

ÔÚOracleÏ¿ª·¢Java³ÌÐòµÄ¾­µäÎÊÌâ½â´ð

 
ÎÊÌâÒ»£ºÈç±£¼ÓÔØJDBCÇý¶¯³ÌÐò£º
 
Õý³£ÎÒÃǼÓÔØÇý¶¯³ÌÐòÓÐÈý¸ö;¾¶£º
 
1.Class.forName(String)ÕâÏëµ±ÓÚclassLoaderÒ»¸öStringÖ¸¶¨µÄÀ࣬ÔÚ×°ÔØʱ°Ñ¸ÃÇý¶¯³ÌÐòµÄ¾²Ì¬ÄÚÈݶ¼³õʼ»¯£¬ÆäʵÕâʱÇý¶¯³ÌÐòÀàµ÷ÓÃÁËDriverManager.registerDriver(driver)·½·¨¡£
 
2.ʹÓÃϵͳÊôÐÔ£ºSystem.getProperty().load(new FileInputStream("ÊôÐÔÎļþ"));
 
ÔÚÊôÐÔÎļþÖÐÖ¸¶¨jdbc.driver=drivername ÕâÑùµÄºÃ´¦ÊÇ¿ÉÒÔͬʱ¼ÓÔضà¸öJDBC£¬»»Êý¾Ý¿âʱ²»Ó÷ÃÎÊJavaÔ´´úÂ룬ֻÊÇÐÞ¸ÄÊôÐÔÎļþ¡£
 
3.Ö±½ÓregisterDriver(driver£©ÕâÖÖ·½·¨×î¿É¿¿£¬¿ÉÒÔÔÚÈκλ·¾³ÏÂʹÓá£
 
1·½·¨¼òµ¥£¬µ«MSµÄJVM²»ÄÜÕýÈ·³õʼ»¯¡£±ÈÈçʹÓÃIEʱÔÚAPPLETÖоͲ»ÄÜʹÓã¬Ó¦¸ÃÓÃ3µÄ·½·¨¡£µ«3£©·½·¨ÔÚÁé»îÐÔ·½Ãæ²»Èç2£¬¿ÉÒÔ¸ù¾Ý»·¾³×ۺϿ¼ÂÇ¡£
 
ÎÊÌâ¶þ£º´ó¶ÔÏó´æ´¢
 
Ò»°ãÀ´Ëµ£¬´ó¶ÔÏó´æ´¢ÊÇ°ÑÎļþ´æµ½Êý¾Ý¿âÖУ¬µ±È»Ò²¿ÉÒÔÄÚ´æÖеij¬´ó×Ö·û´®¡£¶ÔÓÚÏóͼƬÕâÑùµÄÎļþµ±È»ÊÇÓöþ½øÖÆ´æ´¢£¬ÕâÀïÓкܶàÎóÇø£¬ÍøÂçÉϵĽ̳Ì99%¶¼ÊÇÐв»Í¨µÄ£¬
 
Á¬SUN×Ô¼ºµÄÎĵµ¶¼Ò»Ö±´íÎó£¬ËäÈ»´íÎóºÜС¡£°´Ëµ¶þ½øÖÆÎļþÓ¦¸Ã´æΪBLOBÀàÐÍ£¬µ«JBDC2²¢²»ÄÜÖ±½Ó¶ÔBLOB´æÈë¶þ½øÖÆÎļþ£¬Èç¹ûÄãÕâÑù×ö£¬»áµÃµ½Ò»¸öIO¶ø²»ÊÇSQLÒì³££¬Îª´Ë
 
»¨ÁËÎÒ½üÁ½¸öСʱ²ÅŪÇå³þ¡£
 
Èç¹ûÒª°ÑÒ»¸ö¶þÖÆÎļþ´æÈëOracle£¬Óñê×¼µÄJDBCÄã¾ÍÒªÓÃLONG ROWÀàÐÍ£º
 
create table tb_file(name varchar(20),detail long row);
È»ºó:
 
File file = new File("aaa.gif");
int fileLength =(int) file.length();
InputStream fin = new FileInputStream(file);
PreparedStatement pstmt = con.prepareStatement
("insert into tb_file values(´aaa.gif´,?)");
pstmt.setBinaryStream (1, fin, fileLength);
pstmt.executeUpdate();
 
Èç¹ûÄãÒ»¶¨ÒªÓÃBLOB´æ´¢£¬Äã¾Í±ØÐëÓÃOracle×Ô¼ºµÄ·½·¨£º
 
create table tb_file(name varchar(20),detail BLOB);
con.setAutoCommit(false);
stmt.executeUpdate("insert into tb_file values
(´aaa.gif´,empty_blob())");
ÏÂÃæ±ØÐëSELECTµÃµ½BLOBµÄ¶ÔÏóÔÙÏòÀïд£º
 
rs = stmt.executeQuery
("select detail from tb_file
where name=´aaa.gif´
for upfdate" );
if(rs.next())


Ïà¹ØÎĵµ£º

Java¶ÔÏóXMLÐòÁл¯¿ò¼Ü£­Simple2.0


Java¶ÔÏóXMLÐòÁл¯¿ò¼Ü£­Simple2.0


SimpleÊÇÒ»¸öXMLÐòÁл¯¿ò¼Ü£¬Ò»¸öJava
°æ±¾¿íÈݵÄÐòÁл¯¿ò¼Ü£¬Äܹ»¿ìËÙÔÚJava
ƽ̨ÉÏ¿ª·¢XML¡£Ö§³Öͨ¹ýannotationsÍêÈ«ÅäÖû¯µÄXML½á¹¹£»Ìṩ°æ±¾¹ÜÀí¿ò¼ÜÔÊÐíÏòÇ°ºÍÏòºó¼æÈÝÐòÁл¯£»¸üºÃµÄÐÔÄÜ£¬Ê¹ÓÃÇáÁ¿¼¶StAXÌáÉýXML·´ÐòÁл¯
½ø³Ì£¬±ÈXStreamºÍJAXB¸ü¿ì£»Í¨¹ýnamespace ......

java jdbc Á¬½ÓOracle9i

     ×Ô¼ºÔÚ×öÕâ¸ö³ÌÐòµÄʱºò¿´¹ýºÜ¶àµÄ×ÊÁÏ£¬ÉÏÍøÒ²²éÁ˲»ÉÙµÄ×ÊÁÏ£¬¿ÉÊǶà°ë˵µÄÊdzöÉñÈ뻯£¬ÔÆÀïÎíÀï...²»¹â¿´Á˲»Ã÷°×£¬¶øÇÒÊÇÓÐÃ÷°×Ò»µãµÄÈË£¬¿´ÁËÒ²±äµÄÓÐЩģºýÁË¡£
     ÕâÀïÎÒÑÚÊÎÒ»Ì×ÍêÕûµÄjava jdbc Á¬½ÓOracle9iµÄ·¶Àý¡£
package com.lxh.dbcon;//´ò°ü
import ......

javaÖеÄ̰ʳÉßÀý³Ì

×î½üÒªÖØÐÂѧϰJava£¬ÕÒ¸öÀý×ÓÀ´Êµ¼ù£¬ÔÚÍøÉÏÕÒÁ˺ܶàÀý³ÌÀ´¿´£¬×Ô¼ºÖØбàдÁËÒ»¸ö̰ʳÉßµÄÀý×Ó£¬¼ÇÔÚÕâÀï¡£
1.SnakeModel.java
import java.util.Observable;
import java.util.LinkedList;
import java.util.Arrays;
import java.util.Random;
import javax.swing.*;
//ObservableÀàÒ»°ã´ú±íÊý¾Ý£¬ÊµÏÖ½Ó¿ÚRunna ......

java ½âÎö officeϵÁÐÎĵµ

²Î¿¼:
¡¡¡¡http://danadler.com/jacob/
¡¡¡¡http://jakarta.apache.org/poi/
¡¡¡¡http://www.onjava.com/pub/a/onjava/2003/01/22/poi.html
¡¡¡¡http://www.csdn.net/develop/article/15/15311.shtm
¡¡¡¡http://forum.java.sun.com/thread.jsp?forum=40&thread=382666&tstart=0&trange=15
¡¡¡¡Java Excel ......

JAVAϵÁÐÖ®¶ÔÏóµÄÐòÁл¯Óë·´ÐòÁл¯

±¾ÎÄÀ´×Ô£ºhttp://www.javaeye.com/topic/130025   1 ¼ò½é<o:p></o:p> ¶ÔÏóÐòÁл¯(Serializable)ÊÇÖ¸½«¶ÔÏóת»»Îª×Ö½ÚÐòÁеĹý³Ì£¬¶ø·´ÐòÁл¯ÔòÊǸù¾Ý×Ö½ÚÐòÁлָ´¶ÔÏóµÄ¹ý³Ì¡£<o:p></o:p> ÐòÁл¯Ò»°ãÓÃÓÚÒÔϳ¡¾°£º<o:p></o:p> 1. ÓÀ¾ÃÐÔ±£´æ¶ÔÏ󣬱£´æ¶ÔÏóµÄ×Ö½ÚÐòÁе½±¾µ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ