• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

a q about SQL Server 2005 DB and Java

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have an SE application that will be connecting to a SQL Server 2005 DB. At first a problem about the Driver arised when using Microsoft JDBC Driver( the problem was solved by enabling SQL Server Browser and enabling TCP/IP under Network Configuartion).the fix was inside SQL Server 2005 so does my user's need to install the whole SQL Server 2005 in order to use my App which will only be connecting to a SQL server 2005 DB on their local machines ?
[ September 29, 2006: Message edited by: Mahmoud Hadad ]
 
Author
Posts: 531
Mac OS X Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SQL server is reqired just to run on the server and your clients should be able to connect to server from their own pc.
i have never used sql server 2005 , but with sql server 2000 , both with JTDS and microsoft provided JDBC driver you do not need to install anything from sql server package on the client machines.

as you know you need to pass the correct connection URL to your server in order to make clients able to connect to server.


hth
 
Mahmoud Hadad
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the reply, well when i made a connection to my sql server 2005 db it gave an error which was ClassNotFoundException No Suitable Driver Found, the solution was to enable something called SQL Server Browser inside the Configuartion Manager in SQL Server 2005 and enabling TCP/IP in the Network Configuration so all of these things were done inside SQL Server 2005 so i can get a Connection object from the DriverManager and as i understood from a post from someone from Microsoft that JDBC connects to SQL Server 2005 DB via TCP/IP only. so should my users install the whole SQL Server 2005 in order to use my App?
my Application does not connect to a remote DB ,it connects to a DB that comes with my App only.
[ September 29, 2006: Message edited by: Mahmoud Hadad ]
 
Masoud Kalali
Author
Posts: 531
Mac OS X Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
NoClassDefFound and no suitable driver found means that
-you did not include the driver into your classpath
-you are not using a correct connection url that is supported by your registered driver.

as far as i know , MS has changed its connection url in jdbc driver 2005 , so you may need to look at the documentation to ensure that you are using a correct url and Driver class.

the only suggestion that i can give you is to try to use JTDS driver and see whether you have the same problem with it or not.

by default when we install SQL server it uses TCP/IP protocol and IIRC it has options for pipe and IPS/SPX either .

please try the JTDS and let us know the result.
 
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


by default when we install SQL server it uses TCP/IP protocol



This is no longer true for SQL Server 2005. By default TCP/IP is disabled and you will need to enable it to connect via JDBC.


so should my users install the whole SQL Server 2005 in order to use my App?


No. Assuming your server is configured correctly, your users will only need the jdbc driver to connect.
 
reply
    Bookmark Topic Watch Topic
  • New Topic