Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)

like image 978
mrblah Avatar asked Feb 02 '26 10:02

mrblah


1 Answers

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.

like image 55
Jamie McCrindle Avatar answered Feb 03 '26 23:02

Jamie McCrindle



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!