I've been all over looking for what I could be doing wrong. I've had an external cfg.xml file for a SQL Server 2005 database that has been working fine. I now need to bring it internal and programmatically set the values for my connection. I've attempted to set the configuration properties as I have with an Oracle connection, but it's just not making the connection. Any help is greatly appreciated.
Code:
configuration.setProperty("hibernate.connection.url", "jdbc:sqlserver://myserver");
configuration.setProperty("hibernate.connection.database", "db");
configuration.setProperty("hibernate.connection.username", "user");
configuration.setProperty("hibernate.connection.password", "pwd");
Code:
configuration.setProperty("hibernate.connection.url", "jdbc:sqlserver://myserver:1433;databaseName=db");
configuration.setProperty("hibernate.connection.username", "user");
configuration.setProperty("hibernate.connection.password", "pwd");