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

Java²Ù×÷OracleÊý¾Ý¿â£¨½¨±í£¬²åÊý¾Ý£¬É¾³ý£©

ÓÃjpa²»Äܽ¨±í£¬sqlÓï¾äÊǶԵģ¬²»¹ý¾ÍÊDz»Äܽ¨£¬Í¬ÑùµÄsql£¬ÔÚÏÂÃæµÄjdbcÖоͿÉÒÔ£¬¿ÉÄÜÊÇ¿ò¼ÜµÄÏÞÖÆ£¬Ï£Íû¸ßÈËÖ¸µã
import java.net.URL;
import java.sql.*;
public class Create {
public Create() {
}
public static void main(String[] args){
String url = "jdbc:oracle:thin:@10.0.1.3:1521:SDCDB";

String query = "CREATE TABLE MYFIRST" + "(id INT,name CHAR(10))";
String sql="insert into MYFIRST values('1','liming')";
String sql1="insert into MYFIRST values('2','mm')";
String sql2="delete MYFIRST where id=2";
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection(url, "test", "test");
Statement stmt = conn.createStatement();
stmt.executeUpdate(query);
stmt.executeUpdate(sql);
stmt.executeUpdate(sql1);
stmt.executeUpdate(sql2);
System.out.println("Create Success!");
stmt.close();
conn.close();
}
catch(java.lang.ClassNotFoundException e){
System.err.print(e.getMessage());
}
catch(SQLException ex){
System.out.println("\n***SQLException caught ***\n");
}
}


Ïà¹ØÎĵµ£º

OracleÊý¾Ý¿âÃÜÂëÎļþÖÐÔö¼Ó¡¢É¾³ýÓû§£º

µ±³õʼ»¯²ÎÊýREMOTE_LOGIN_PASSWORDFILEÉèÖÃΪEXCLUSIVEʱ£¬ÏµÍ³ÔÊÐí³ýINTERNAL/SYSÒÔÍâµÄÆäËûÓû§ÒÔ¹ÜÀíÔ±Éí·Ý´ÓÔ¶¶Ë»ò±¾»úµÇ¼µ½OracleÊý¾Ý¿âϵͳ£¬Ö´ÐÐÊý¾Ý¿â¹ÜÀí¹¤×÷;ÕâЩÓû§Ãû±ØÐë´æÔÚÓÚÃÜÂëÎļþÖУ¬ÏµÍ³²ÅÄÜʶ±ðËûÃÇ¡£ÓÉÓÚ²»¹ÜÊÇÔÚ´´½¨Êý¾Ý¿âʵÀýʱ×Ô¶¯´´½¨µÄÃÜÂëÎļþ£¬»¹ÊÇʹÓù¤¾ßORAPWD.EXEÊÖ¹¤´´½¨µÄÃÜÂëÎļþ£¬¶ ......

oracle Êý¾Ý¿â´´½¨DBLink Óï·¨

-- Drop existing database link drop database link DL_name
-- Create database link create database link DL_name connect to username identified by userpwd using '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=ipaddress)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=service_name)))'; ......

Java and XML_¶ÁÊé±Ê¼Ç_2010 5 18

2010-05-18
Îå¡¢ÑéÖ¤XML
l  ÊôÐÔÁËÌØÕ÷·½·¨
·½   ·¨
·µ»ØÀàÐÍ
²Î    Êý
Óï    ·¨
setProperty()
void
String propertyId,
Object value
parser.setProperty(“[Property URI]”,
”[Object parameter]”);
setFeature()
void
String feat ......

java ²é¿´Îļþ¼ÐÏÂÃæËùÓÐÎļþÒÔ¼°Îļþ¼Ð

import java.io.File;
import java.util.Date;
import java.util.Iterator;
import java.util.Vector;
import java.text.SimpleDateFormat;
public class FileViewer {
  File myDir;
  File[] contents;
  Vector vectorList;
  Iterator currentFileView;
  File currentFile;
  ......

java´ò°üexe ÖÆ×÷°²×°°ü With JRE ×ÔÆô¶¯

Ä¿±ê:Óа²×°³ÌÐò°üÏñ°²×°qqÒ»Ñù¼òµ¥Ò»Ö±ÏÂÒ»²½¼´¿É ,¿ÉжÔØ,ÒªÇó³ÌÐò×Ô¶¯Æô¶¯,²»ÐèÒªµ¥¶À°²×°JRE,¾ÍÔÚдÕâÌ×½â¾ö·½°¸µÄʱºò,ÎÒÕæÊÇ°Ù°ãÍ´ºÞ΢Èí.°¥ÎÞÄΰ¡.ÐÒºÃ×îÖÕ»¹ÊDZ»ÎÒÏë³öÀ´ÁË,·ÖÏíÏ°ɡ£
 
µÚÒ»²½
jre¼õ·Ê,ɾ³ýjre\lib\rt.jarÖв»Ê¹ÓõÄÀà,ɾ³ýcharsets.jarÖв»Ê¹ÓõÄ×Ö·û¼¯±àÂë.MyWork¿ªÔ´ÏîÄ¿(http://mywor ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ