No suitable driver found for jdbc:Orcale:thin:@localhost:1521:orcl
我用的是orcale11g企业版的版本驱动下的是orcale6.jarstaticStringurl="jdbc:Orcale:thin:@localhost:1521:...
我用的是orcale11g 企业版的版本 驱动下的是orcale6.jar
static String url="jdbc:Orcale:thin:@localhost:1521:orcl";
static String username = "scott";
static String password = "tiger";
public static Connection getconnection()
{
Connection conn = null;
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
conn= DriverManager.getConnection(url,username,password);
} catch (ClassNotFoundException e) {
System.out.println("没有找到该类!");// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
System.out.println("数据库连接失败1");
e.printStackTrace();
}
return conn;
}
代码如下 求大神们讲解 展开
static String url="jdbc:Orcale:thin:@localhost:1521:orcl";
static String username = "scott";
static String password = "tiger";
public static Connection getconnection()
{
Connection conn = null;
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
conn= DriverManager.getConnection(url,username,password);
} catch (ClassNotFoundException e) {
System.out.println("没有找到该类!");// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
System.out.println("数据库连接失败1");
e.printStackTrace();
}
return conn;
}
代码如下 求大神们讲解 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询