<?xml version= "1.0" encoding= "UTF-8"? ><! Doctype hibernate-configuration public "-//hibernate/hibernate configuration dtd 3.0// EN "Http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd" > Follow Hibernate's properties configuration db instance file to see.
# # Microsoft Driver (not recommended!) #hibernate. Connection.driver_class com.microsoft.jdbc.sqlserver.sqlserverdriver#hibernate.connection.url jdbc: Microsoft:sqlserver://1e1;databasename=test; selectmethod=cursor## the New Microsoft Driver #hibernate. Connection.driver_class Com.microsoft.sqlserver.jdbc.sqlserverdriver#hibernate.connection.url Jdbc:sqlserver://localhost
The first way is not recommended. So I try to use the second way. The result was an error. The error is as follows, Error1.
Error1INFO:HHH000115:Hibernate Connection Pool size:20 (min=1) Exception in thread "main" Org.hibernate.exception.JDBCC Onnectionexception:error calling Driver#connect
The second way: according to the example, there is no database description ah. <property name= "Hibernate.connection.url" >jdbc:sqlserver://127.0.0.1:1433/hibernate</property>
The first way: The result is successful. Where does the problem really go??? <property name= "Hibernate.connection.url" >jdbc:sqlserver://127.0.0.1:1433;database=hibernate</property >
I want to ask what is the way hibernate recommends connecting the Sqlsever database?
Hibernate Configuration Connection sqlsever2008 database