package dbbean;
import java.sql.*;
public class contactbean{
private connection con; //初始化连接。
public contactbean() {
try { class.forname("oracle.jdbc.driver.oracledriver").newinstance();
string url="jdbc:oracle:thin:@localhost:1521:hcm";
string user="jsp教程dev";
string password="19831007";
con= drivermanager.getconnection(url,user,password);
}
catch (instantiationexception e)
{ // todo auto-generated catch block
e.printstacktrace();
} catch (illegalaccessexception e)
{ // todo auto-generated catch block
e.printstacktrace();
}
catch(classnotfoundexception e)
{
system.out.println("driver not found!");
con=null;
}
catch(sqlexception e)
{ con=null; }
}
//代码二
class.forname("oracle.jdbc.driver.oracledriver").newinstance();?
string?url="jdbc:oracle:thin:@localhost:1521:orcl";?
//orcl为你的数据库教程的sid?
string?user="scott";?
string?password="tiger";?
connection?conn=?drivermanager.getconnection(url,user,password);?//
class.forname("oracle.jdbc.driver.oracledriver").newinstance();?
string?url="jdbc:oracle:thin:@localhost:1521:orcl";?
//orcl为你的数据库的sid?
string?user="scott";?
string?password="tiger";?
connection?conn=?drivermanager.getconnection(url,user,password);?
statement?stmt=conn.createstatement(resultset.type_scroll_sensitive,resultset.concur_updatable
%>
创造与魔法九游版本
创造与魔法九游版采用了极致创新的魔幻游戏玩法感受,游戏具备最
疯狂医院达什医生中文版(Crazy Hospital)
疯狂医院达什医生最新版是一款医院模拟经营类游戏,逼真的场景画
宝宝庄园官方版
宝宝庄园官方版是一款超级经典好玩的模拟经营类型的手游,这个游
桃源记官方正版
桃源记是一款休闲娱乐类的水墨手绘风格打造的模拟经营手游。玩家
长途巴士模拟器手机版
长途巴士模拟器汉化版是一款十分比真好玩的大巴车模拟驾驶运营类