Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error connecting to SQL Server 2000

 
Anas Nashroel
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... and have you enabled TCP/IP support on your server instance? Have you configured your server to allow SQL Server authentication?
 
Anas Nashroel
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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 ??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic