首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

Hibernate 各种数据库的配备(转)

2012-10-08 
Hibernate 各种数据库的配置(转)1. MySql连接配置MySql数据库的hibernate连接设置,在hibernate.cfg.xml文

Hibernate 各种数据库的配置(转)
1. MySql连接配置  
 
MySql数据库的hibernate连接设置,在hibernate.cfg.xml文件中

<!--驱动程序-->    <property name="connection.driver_class"> sun.jdbc.odbc.JdbcOdbcDriver </property>    <!-- JDBC URL -->    <property      name="connection.url">jdbc:odbc:Driver={MicroSoft..Access..Driver(*.mdb)};DBQ="+application.getRealPath("/Data/ReportDemo.mdb")</property> ;//myDB为数据库名     <!-- 数据库用户名-->    <property name="connection.username">myuser</property>    <!-- 数据库密码-->    <property name="connection.password">mypassword</property>

热点排行