views:

95

answers:

1

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)

+2  A: 

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.

jamie mccrindle
what would the hibernate.cfg.xml look like?
mrblah
the answer has been updated with examples
jamie mccrindle