Oracle ÓëÔÚJavaÖеÄÁ´½Ó
תÌû´¦£ºhttp://dong-java.javaeye.com/blog/375150
1¡£ÍƼöʹÓÃOralce±È½ÏеÄ10.2.0.3 JDBC Drivers¡£Õâ¸ö°æ±¾¶Ô±È9.2µÄ×î´óµÄºÃ´¦ÊÇDriverManager.setLoginTimeoutº¯ÊýÊÇÆð×÷Óõġ£ÉèÖÃÁËÕâ¸ö²ÎÊý£¬ÔÚ¶ñÁÓµÄÍøÂç»·¾³ÖоͲ»»áÓÐÁ¬½ÓÊý¾Ý¿âµÄº¯Êý³¤Ê±¼ä²»·µ»ØµÄÇé¿ö¡£
2¡£JDBC Developer!ˉs Guide and Reference 10g Release 2 (10.2)
¸ø³öµÄÁ¬½ÓÊý¾Ý¿âµÄʾÀý£º
import java.sql.*;
import oracle.jdbc.pool.OracleDataSource;
class JdbcTest {
public static void main (String args []) throws SQLException {
// Create DataSource and connect to the local database
OracleDataSource ods = new OracleDataSource();
ods.setURL("jdbc:oracle:thin:@//myhost:1521/orcl");
ods.setUser("scott");
ods.setPassword("tiger");
Connection conn = ods.getConnection();
// Query the employee names
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery ("SELECT ename from emp");
// Print the name out
while (rset.next ())
System.out.println (rset.getString (1));
//close the result set, statement, and the connection
rset.close();
stmt.close();
&n
Ïà¹ØÎĵµ£º
//´òÓ¡³ömess±íµÄÁÐÊýÊǶàÉÙ
public static void main(String[] args){
String sql="select count(*) from mess";
ResultSet set=null;
try {
Object paramValues[] = new Object[0];
set = DBUtil.preExec ......
1£®JavaµÄ¼òµ¥ÀàÐͼ°Æä·â×°Æ÷Àà
¢ÅJava¼òµ¥ÀàÐÍÓë·â×°Àà
ÎÒÃÇÖªµÀ,JavaÓïÑÔÊǵäÐ͵ÄÖ§³ÖÃæÏò¶ÔÏóµÄ³ÌÐòÓïÑÔ,µ«¿¼Âǵ½ÓÐЩ»ù±¾Êý¾ÝÀàÐ͵Ľṹ¼òµ¥,Õ¼ÄÚ´æСÇÒ´æÈ¡ËٶȿìµÈÓŵã,JavaÒÀÈ»ÌṩÁ˶ÔÕâЩ·ÇÃæÏò¶ÔÏóµÄ¼òµ¥Êý¾ÝÀàÐ͵ÄÖ§³Ö¡£µ±È»,JavaÔÚÌṩ´óÁ¿µÄÆäËüÀàʱ,Ò²ÌṩÁËÓë¼òµ¥Êý¾ÝÀàÐͶÔÓ¦µÄ·â×°Àà,ÓÚÊÇ,JavaÖ ......
´úÂëÈçÏ£º
1 String command = " cmd /c C:/Program Files/MySQL/MySQL Server 5.0/bin>mysqldump -h localhost -u root -p aijia > E:/aijia.dmp " ;
2 try {
3 Process process& ......
Ò»¡¢Ê²Ã´ÊÇJavaÐéÄâ»ú
µ±Äã̸µ½JavaÐéÄâ»úʱ£¬Äã¿ÉÄÜÊÇÖ¸£º
1¡¢³éÏóµÄJavaÐéÄâ»ú¹æ·¶
2¡¢Ò»¸ö¾ßÌåµÄJavaÐéÄâ»úʵÏÖ
3¡¢Ò»¸öÔËÐеÄJavaÐéÄâ»úʵÀý
¶þ¡¢JavaÐéÄâ»úµÄÉúÃüÖÜÆÚ
Ò»¸öÔËÐÐ ......
Bean Serializable Interface µÄ½Ó¿ÚÈÃBEAN¿ÉÒÔ´®Ðл¯£¬½«Æä±ä³ÉÒ»¸ö¿É±£´æΪÒÔºóʹÓõĶþ½øÖÆÁ÷¡£µ±Ò»¸öBEAN±»ÏµÁл¯µ½´ÅÅÌÉÏ»òÕßÆäËûÈκεط½£¬Æä״̬±»±£´æÆðÀ´£¬ÆäÖеÄÊôÐÔÖµÒ²²»»á¸Ä±ä¡£ÔÚBEANµÄ¹æ·¶ÖУ¬JSP²¢Ã»ÓÐÒªÇóBEANʵÏÖSerializable½Ó¿Ú¡£µ«ÊÇ£¬Èç¹ûÄúÏ£Íû×Ô¼º¿ØÖÆÄúËù´´½¨µÄ×é¼þµÄserialization½ø³Ì£¬»òÕßÄúÏë ......