SQL Server Libraries for Java - java

I'm curious to find what SQL Server libraries are available for Java.
At present we are using the com.microsoft.jdbc.sqlserver.SQLServerDriver driver. I think this was downloaded from the Microsoft site a while ago.
What alternative libraries are available?
Many thanks,
Andez

Seconding the open source jTDS Driver. It also works perfectly with Hibernate.

DataDirect is a well known alternative (used by many vendors) but also others such as
connx
attunity
i-net
Easysoft
JTDS is an open source alternative
NB: I have only used the MS driver, DataDirect and the i-net drivers suceccfully in production, mostly prior to the MS JDBC driver release.

Related

Java Web Application with .NET Database

I was wondering if I could get some advise/suggestions if anyone has experience with the following situation.
So I want to develop a java web app that "talks" with a database that is already built out in .NET. I have experience coding java web apps in eclipse that talked to MySQL DBs so I don't think the database language is that concerning.
What methods would you go about to implement this? Are there certain programs that are more useful than others? What frameworks should I use? Also, examples that I found on the web seem so dated style wise, are there things I can do to web apps coded in eclipse to give it some pop?
Thank you in advance
Microsoft has a JDBC driver for MSSQL.
Refer to: http://msdn.microsoft.com/en-us/sqlserver/aa937724.aspx
Call me JDBC on any database.
In these days, from the point of database vendor, they will give us a nice library (driver) to communicate their product from any (widely using) programming language.
Java is a big dealing programming language in world wide, so don't worry about database connection as this can be done by a jar featuring JDBC.
So your challenge is JDBC driver to suite and map to required database brand and its version.
You just need to worry to be right plug between the database's version and the JDBC driver library (jar file) version. Don't care on any database of MySQL, Oracle, MSSql or so on.
Java app -> JDBC Driver -> Database
Famous database's JDBC drivers;
MSSql JDBC Driver (What you need one?)
MySql JDBC Driver
Oracle JDBC Driver

using Eclipse for JDBC and MySQL

I'm trying to install a couple of things so I can practice querying DB's with JDBC. But even with the copious amount of info I found through Google I'm not convinced I'm clear on what I need. It seems I need the Eclipse SQL Explorer plugin and MySQL 5.6 for Windows. Have I got that correct? And what about the JDBC Driver for MySQL (Connector/J) on the MySQL website?
Do I not need to worry about that when I'm using Eclipse?
you need the following things
mysql database
eclipse IDE
mysql.jar
jdk/jre

Java with MS SQL?

I am new in Java world. I worked before with .NET environment with MS SQL database, I would like to ask if I can still use MS SQL database with Java? and what tools do I need to proceed with that?
These days, you can use just about any database you want. Microsoft provides JDBC drivers for your use. You can get everything you need here: http://msdn.microsoft.com/en-us/sqlserver/aa937724
This link will allow you to download the JDBC driers an has usage info.
Here's the link to download: http://msdn.microsoft.com/en-us/sqlserver/aa937724

Java and Sybase

What is the difference between the drivers provided using jtds.jar and jconn3.jar?
JTDS is open source (LGPL), the other is proprietary, made by sybase. In terms of which performs better, you would have to benchmark.
Sybase calls their latest JDBC jconn4.jar, so the version you are referencing complies with the JDBC 2.0 spec only. JTDS complies with JDBC 3.0. Whether or not that is important depends on the version of Java you are using to run your application.
jTDS works with both Microsoft SQL Server and Sybase. SQL Server is the product of a "collaboration" between Microsoft and Sybase, so that's not surprising.

How to connect between MySQL and Eclipse Java?

How do I establish database connectivity between MySQL and Eclipse Java?
Lots of ways:
Hibernate
EJB (make sure you go with version 3!)
Roll your own solution with JDO/JDBC
And I'm sure there are plenty of other ways to do it as well.
You need a JDBC driver for MySQL in your application classpath which then registers automatically with DriverManager.
You can then use the techniques described in http://java.sun.com/docs/books/tutorial/jdbc/basics/connecting.html except you need to have the connection string (starting with jdbc:...) adapted to your precise scenario. That is described in the documentation for the JDBC driver you choose to use.
There are plenty of jdbc tutorials if you want to build your own solution. MYsql has a Using MySQL With Java page that has links to tutorials, presentations, blogs etc. The first tutorial looks like it covers everything from installing the database to accessing it from the java program.

Categories

Resources