use the jTDS sql server driver, available at sourceforge.net On Apr 5, 2009, at 9:08 PM, Srikanth Vasudevan wrote:
> Hello all, > > I'm facing problem connecting MS SQL Server Database. Here is the > error which I'm annoying from. > > WARNING: ConnectionID:3 Prelogin error: host localhost port 1434 > Error reading prelogin response: Connection reset > SQLException: Connection reset > Exception in Statement : null > sql exception in insertTable : null > > WARNING: ConnectionID:3 Prelogin error: host localhost port 1434 > Error reading p > relogin response: Connection reset > Apr 5, 2009 8:35:05 PM > com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin > > > Data base server : MS SQL Server 2008 Developer edition > > Web Server : Tomcat 4.1 > > JDBC: Microsoft SQL Server JDBC Driver 2.0 (I have copied > sqljdbc4.jar file to the lib directory of tomcat server) > > Here is the code snippet which I'm using to connect to the databse.. > > try{ > Class.forName > ("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance(); > con = DriverManager.getConnection("jdbc:sqlserver:// > localhost:1434;databaseName=PROJECT;integratedSecurity=true"); > } > > Can someone please help me out solving this issue. > > Thanks! > Srikanth > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en -~----------~----~----~----~------~----~------~--~---