Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sulthans
Starting Member
1 Post |
Posted - 2010-02-11 : 02:40:23
|
Hi i am new to SQLThis is my code for database connection,public Connection db() throws SQLException { try {System.out.println("Testing........"); Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); System.out.println("loading driver..."); connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=HIDS"); System.out.println("connection established...");} catch (Exception e) { e.printStackTrace(); } return connection; }when i try to connect i am getting error, and i cant load the driver and connect to the database. |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2010-02-11 : 03:05:37
|
Which error?I think the error is due to missing credentials. N 56°04'39.26"E 12°55'05.63" |
|
|
|
|
|