File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Error connecting to SQL Server 2000 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Error connecting to SQL Server 2000" Watch "Error connecting to SQL Server 2000" New topic
Author

Error connecting to SQL Server 2000

Anas Nashroel
Greenhorn

Joined: May 21, 2008
Posts: 12
Hi,
I have a problem with using SQL Server 2000 with my application.
Here's the data access code:



and here's the error messages:


I have dropped jdbc driver (msbase.jar, mssqlserver.jar, msutil.jar) to the webapp lib folder
Are there any issues regarding connection to SQLServer 2000 through java application ??

Thanks in advance,
Regards,

My spec:
Windows XP Professional
Tomcat 5.5
JRE 1.5.0_15
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42267
    
  64
There are no specific issues with this setup. Can you connect to the DB using the exact same code from a desktop application?

By the way, you should remove the ".newInstance()" from the code. That's superfluous (and possibly harmful, depending on how the driver is written).


Ping & DNS - my free Android networking tools app
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

... and have you enabled TCP/IP support on your server instance? Have you configured your server to allow SQL Server authentication?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Anas Nashroel
Greenhorn

Joined: May 21, 2008
Posts: 12

Can you connect to the DB using the exact same code from a desktop application?



I haven't tried this...


have you enabled TCP/IP support on your server instance

I have read the manuals about How to manually enable TCP/IP on Windows XP sp 2 for SQL Server 2000
I added an open TCP port 1433 and name it SQL Server. I also added an open UDP port 1434 and name it SQL Server UDP.. However, the problem remains..
When I open command prompt and type netstat -an, both ports are not on the listening list. I also open the browser and go to the application..it throws the same error..



Have you configured your server to allow SQL Server authentication?


How can i do this ??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error connecting to SQL Server 2000