This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JDBC and the fly likes Is it hard to use SQL Server with Java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Is it hard to use SQL Server with Java?" Watch "Is it hard to use SQL Server with Java?" New topic
Author

Is it hard to use SQL Server with Java?

Jay Dilla
Ranch Hand

Joined: Aug 12, 2004
Posts: 201
I have used Oracle 9i and JDBC before and I know SQL well enough to run queries. I told a company that I know SQL Server figuring it can't be THAT much different then Oracle. But after doing research I found out Oracle supports Java much better. So I'm wondering if simply knowing SQL will be enough for the job. Are there any good sites with SQL server - Java examples?
can I use JDBC methods with SQL Server?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


But after doing research I found out Oracle supports Java much better.

True, Oracle support's Java, whereas SQL Server does not. However this only matters if you are considering writing stored procedures in Java. If all you want is standard JDBC access to a SQL Server instance, you'll hardly notice the difference between Oracle and SQL Server.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Jay Dilla
Ranch Hand

Joined: Aug 12, 2004
Posts: 201
Originally posted by Paul Sturrock:

True, Oracle support's Java, whereas SQL Server does not. However this only matters if you are considering writing stored procedures in Java. If all you want is standard JDBC access to a SQL Server instance, you'll hardly notice the difference between Oracle and SQL Server.


So I can use the same DataSource, Result, Connection objects with SQL server?
What are the major differences in regards to stored procedures.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


So I can use the same DataSource, Result, Connection objects with SQL server?

Yes - since these are all interfaces. The implementations are provided by the Driver you choose (Microsoft supply one which is fine, but I'd recommend jTDS).

What are the major differences in regards to stored procedures.

The big difference is in Oracle you can use PL/SQL or Java to implement your stored procedures. In SQL Server it is Transact-SQL you use. If you are familiar with PL/SQL, T-SQL is fairly easy to pick up.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is it hard to use SQL Server with Java?