Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

cant connect to mssql server using jdbc and java web start

843802Aug 7 2003 — edited Jan 12 2007
Hi,
I have an application that runs without issue on a local machine. However when I deploy it using Java Web Start I am unable to establish a connection to a msSql database.

The following code is what works on a standalone machine.
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://SERVER:1433;user=USERNAME;password=PASSWORD;DatabaseName=DB");

I am new to using Java web start and from seaching the forum I see I have to load the class differently and load resources. However I am unable to find an example of how to do this. I have tried playing around with getClassLoader() and getResource() but with no luck. Any help would be much appriceated.

Thanks
David
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 9 2007
Added on Aug 7 2003
6 comments
265 views