• 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 wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

How to Connect SQL Server with java using JDBC

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,
I am new in this room, earlier i was active in the Beginners room and the SCJP room, now i think that i have grown up to be in intemediate's room please help me out with the following querry:
I dont know how to connect a java program with Microsoft SQL server using JDBC please help me out!!!

loveen
 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as I know, SQL Server, being a MS product, does not supply a direct JDBC driver, so you'd have to use the jdbc-odbc bridge driver which Sun (I think) provides. Search the web for 'jdbc odbc bridge', or maybe someone else will answer you more directly.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to JDBC
 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I have used MSSQL Driver from MS sometime back when it was just released first in Beta version. They do have one for JDBC.
here you go
Try to see if that works. the file is called mssqlserver.tar I guess.
Regards
Maulin
 
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Microsoft has a JDBC driver that is supposed to work with both Unix and Windows. I am not sure if it is free
My company uses an old jdbc driver called http://www.inetsoftware.de/.
We use it to call only one small stored procedure. We do not own the SQL Server database, in our case...
U can also find other commerical jdbc drivers as well for SQL Server, though Surprisingly
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Loveen,
Download the MS SQL 2000 Server JDBC Driver from here. As it is a Microsoft product, it "installs" the files and creates shortcuts to the documentation. You will need to read it's documentation to learn how to construct the connection URL and what Driver package to use.
Next, go through the JDBC Tutorial on suns site.
When you have specific questions about the code you are working on (problems, errors, exceptions, etc) give us a shout.
 
reply
    Bookmark Topic Watch Topic
  • New Topic