aspose file tools
The moose likes JDBC and the fly likes How to Connect SQL Server with java using JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "How to Connect SQL Server with java using JDBC" Watch "How to Connect SQL Server with java using JDBC" New topic
Author

How to Connect SQL Server with java using JDBC

Loveen Jain
Ranch Hand

Joined: Jan 24, 2004
Posts: 35
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
Billybob Marshall
Ranch Hand

Joined: Jan 27, 2004
Posts: 202
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.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24050
    
  13

Moving to JDBC


[Jess in Action][AskingGoodQuestions]
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1865
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


1. Have fun @ http://faq.javaranch.com/java/JavaRaq
2. Looking for simple infix2postfix conversion and postfix evaluation package? Click here
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1064
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
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

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.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel
 
subject: How to Connect SQL Server with java using JDBC
 
Similar Threads
SQL Server express 2008 jdbc connection problem
syntax for connection of jdbc with sql server
Unable to connect to a datasouce, getting the SQL sqlstate 08001
How to connect using JDBC ODBC bridge
JDBC to MS SQL Server