数据库链接
Posted 安静的风a
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了数据库链接相关的知识,希望对你有一定的参考价值。
oracle
//驱动
public static final String DRIVER = "oracle.jdbc.driver.OracleDriver";
//URL
public static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl";
//用户名
public static final String USERNAME = "bl_jsp";
//密码
public static final String PASS = "123";
mysql
public final static String DRIVER = "com.mysql.jdbc.Driver";
public final static String URL = "jdbc:mysql://localhost:3306/company";
public final static String DBNAME = "root";
public final static String DBPASS = "1234";
sql
public final static String DRIVER = "com.microsoft.jdbc.sqlserver.SQLServerDriver"; // 数据库驱动
public final static String URL = "jdbc:microsoft:sqlserver://localhost:1433;DataBaseName=company"; // url
public final static String DBNAME = "sa"; // 数据库用户名
public final static String DBPASS = "120010";
以上是关于数据库链接的主要内容,如果未能解决你的问题,请参考以下文章