Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÒýÓÃ


class Tank{
 int level;
}
public class Assignment {
 public static void main(String[] args) {
  
  Tank t1 = new Tank();
  Tank t2 = new Tank();
  t1.level= 9;
  t2.level= 47;
  
  System.out.println("1:t1.l ......

ѧJAVAÐèÒªÕÆÎյļ¼Êõ¼°Á÷³Ì


ѧJAVAÐèÒªÕÆÎյļ¼Êõ¼°Á÷³Ì
¶ÔÓÚjava³õѧÕßÀ´ËµÅÓ´óµÄJavaÓïÑÔ²»Öªµ½´ÓÄÄÀïÈëÊÖ¿ªÊ¼Ñ§Ï°£¬Ò²²»ÖªµÀ¶¼ÒªÑ§Ð©Ê²Ã´²ÅÄÜ·ûºÏÆóÒµµÄÒªÇó£¬ÒÔÏÂÊÇjava˽ÛÓ¸ù¾Ý¼¼ÊõµÄ¸üжøµ÷ÕûµÄ×îнÌѧÄÚÈݼ°Á÷³Ì£¬¹©´ó¼Ò²Î¿¼¡£
1.javaµÄ»ù´¡ÖªÊ¶
²»Òª±»Ð¼¼ÊõÃÔ»ó£¬ËùνÍò±ä²»ÀëÆä×Ú£¬Ð¼¼Êõ¶¼ÊÇ»ùÓÚjavaµÄ»ù´¡Ö®ÉÏ£¬Èç¹û»ù´¡²»Ôúʵ£¬¶Ô ......

»ùÓÚWindows CEµÄǶÈëʽJava½â¾ö·½°¸


[ÕªÒª]
±¾ÎĽéÉÜÁËһϵÁлùÓÚWindows CEµÄJavaÐéÄâ»úÒÔ¼°¼¯³É¿ª·¢»·¾³£¬ÆäÖаüÀ¨ IBM¹«Ë¾µÄVisual Age Micro Edition
£¨¾ÍÊÇÏÖÔÚµÄWebSphere Studio Device Developer£©,
Sun¹«Ë¾µÄPersonal Java, WabaSoft ·¢ÆðµÄWaba£¬Insignia¹«Ë¾µÄJeode (¾ÍÊÇÏÖÔÚEsmertecµÄJeode)£¬Nsicom¹«Ë¾µÄCrEmeÒÔ¼°New
Monics¹«Ë¾µÄPE ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ