Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java Databases
| Search | Today's Posts | Mark Forums Read
Java Databases Discussion specific to working with Java Databases. For other Java topics, please see related Java forums. For database discussions not specific to Java, please see the Database category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 7th, 2006, 11:49 PM
Authorized User
 
Join Date: Mar 2005
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft SQL Server 2005 Connection Problem

The SQL server was installed in the PC and the JDBC driver jar file was installed also. But when I try to connect to the database, an error is encountered. The error message:
"com.microsoft.sqlserver.jdbc.SQLServerExcepti on: The TCP/IP connection to the host failed".

The 2 basic line of codes:
class.forname("com.microsoft.sqlserver.jdbc.SQLSer verDriver");
Connection con = DriverManager.getConnection( "jdbc:sqlserver://localhost;user=username;passwrod=password);
(as suggested by Microsoft docmention. Please know also the database name added to the Connection statement still does not make any different neither the port 1433.)
I am able to ping localhost (or ping 127.0.0.1) and TCP/IP is enable within the server, etc. Even setup exception port 1433 on firewall! Just don't know what else I can check or something I forget to setup?

Please help and thanks in advance for your help.

Best,
Don't Know Much






Similar Threads
Thread Thread Starter Forum Replies Last Post
Sql server 2005 connection problem Mahenj C# 2005 17 April 20th, 2015 12:12 AM
remote sql server 2005 problem navbingo20 ASP.NET 2.0 Basics 2 July 16th, 2008 03:08 AM
Microsoft SQL Server 2005. explore_asp SQL Server 2005 0 August 29th, 2007 03:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.