This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Error connecting to SQL Server 2000

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ??
 
Do not meddle in the affairs of dragons - for you are crunchy and good with ketchup. Crunchy tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic