Home > Database > Mysql Tutorial > MYSQL,Oracle,SQL数据库在JSP中的驱动_MySQL

MYSQL,Oracle,SQL数据库在JSP中的驱动_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 14:03:08
Original
783 people have browsed it
 

MYSQL

datasource.url=jdbc:mysql://localhost:3306/bbscs6?useUnicode=true&characterEncoding=UTF-8

datasource.username=root

datasource.password=root

 

 

Oracle

datasource.driverClassName=oracle.jdbc.driver.OracleDriver

datasource.url=jdbc:oracle:thin:@192.168.0.1:1521:SID

datasource.username=bbscs

datasource.password=bbscs

datasource.defaultAutoCommit=true

hibernate.dialect=net.sf.hibernate.dialect.OracleDialect

如果是Oracle9,写

hibernate.dialect=net.sf.hibernate.dialect.Oracle9Dialect

 

 

SQL Server

datasource.driverClassName=com.microsoft.jdbc.sqlserver.SQLServerDriver

datasource.url=jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=bbscs

datasource.username=bbscs

datasource.password=bbscs

datasource.defaultAutoCommit=true

hibernate.dialect=net.sf.hibernate.dialect.SQLServerDialect

 

 

其中,datasource.username为数据库ID,datasource.password为数据库密码。ID一般自定义为sa,密码自定。驱动包括 库名,ID,密码,计算机名,端口号(没按先后顺序说)等。JSP操作数据库需要响应的数据库驱动进行连接,或者使用JDBC,ODBC。

以上如有错误或不足,请各位高人 鸡蛋西红柿尽管抛来~ 抛完我负责收拾现场。别忘了留下你们的意见和建议!!!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template