简体   繁体   中英

special driver to connect to sql server 2008 express

I'm a java newbie, want to test out some hibernate goodies!

I have netbeans installed, and I included the Hibernate libraries.

I then created a new package named Model.

I will drop my Class and xml config files in there.

Do I need a special library to connect to sql server? (windows machine)

Yes, you'll need a JDBC library that talks to Microsoft SQL Server. jTDS used to be my first choice but the Microsoft JDBC driver has come a long way and I'd recommend using that. You can download it from this site .

You'll also need to follow these instructions to get the two talking to each other as SQL Server express doesn't listen to TCP by default and uses Windows Authentication Mode.

Have a look at these two URLs for examples of your hibernate.cfg: An explanatory Blog Entry and a JavaRanch Question .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM