the three database engines differ in the connection way:
1 - due to mysql you need to do the following:
a - downloda the following file:
http://mysql.easynet.be/Downloads/Connector-J/mysql-connector-java-3.1.14.tar.gz
and extract it. you will find a jar file inside it (mysql jdbc driver) called mysql-connector-java-x.x.x-bin.jar
copy the last jar file into your class path.
b - copy and compile the following code:
import java.sql.Connection;
import java.sql.DriverManager;
public class ConnectionTest
{
public static void main(String args[])
{
connect();
}
public static void connect()
{
try
{
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://<database-host-name>:<database-port>/<database-name>";
String userName = "<your-database-schema-user-name>";
String password = "<your-database-schema-password>";
Connection con = DriverManager.getConnection(url, userName, password);
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
}
after compiling this code, you then have established a connection to mysql database.
2 - Due to microsoft access you can connect through the JDBC/ODBC Bridge without downloading any driver.
3 - Due to sql server, I think you have to install specific software ( called Microsoft SQL Server 2000 driver for JDBC) to can connect.
for further reading this is jdbc tutorial page : http://java.sun.com/docs/books/tutorial/jdbc/index.html
Good Luck
Ahmad Elsafty