求MyEclipse链接oracle方面的电子书
求MyEclipse链接oracle方面的电子书
Java code:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class DBCon {
public static String driver="oracle.jdbc.driver.OracleDriver";
public static String url="jdbc:oracle:thin:@192.168.0.174:1521:ORCL";
public static String user="scott";
public static String pwd="tiger";
public static Connection getConnection(){
try {
Class.forName(driver);
Connection con=DriverManager.getConnection(url, user, pwd);
System.out.println("con success");
return con;
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
public static void close(Connection con,Statement stm,ResultSet rs){
if(con!=null){
try {
con.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
if(stm!=null){
try {
相关问答:
本来要写个update语句
update table_a A
set A.flag=1
where A.id in (select B.id from table_b B)
结果误写成
update table_a A
set A.flag=1
where ......
exp user/password@dbname file=c:\table.dmp tables=jbitaku,jbitakum grants=y
然後按回車鍵 說明: user/password@dbname 分別表示用戶名,密碼和服務名 f ......
各位oracle高手,请教一下为什么oracle 10g在安装到百分之八十五的时候就报错不能继续安装?
内存多大? 重新下个数据库安装试试..
引用
各位oracle高手,请教一下为什么oracle 10g在安装到百分之八十五的时 ......
private static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl";
private static final String USERNAME = "sys";
private static final String PASSWORD = "s ......
大家遇到ORACLE分页都是怎么处理的?
是用SQL语句分页?还是用可滚动的结果集分页?
希望大家能把代码贴出来。
最后大家感觉哪种效率高?为什么?
要是用hibernate的话,就不用管是不是oracle了。
我只知道orac ......