Am new to Java, UnixODBC and MYSQL. I need help with running a java program that connects to a mySQL DB and retrieves values.

I use Mandriva Linux, I installed UnixODBC (I have the GUI too), MySQL (I have SQLGUI too).

With the help of instructions from the unixodbc site I have been able to set up the driver for mysql in the odbcconfig and also successfully created the DataSouceName (DSN) as data1.

Now, my java program code is as follows...

import java.io.DataInputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

class employee_prg
	public static void main(String args[])
     	   DataInputStream in = new DataInputStream (System.in);
     	   System.out.println("Please enter employee number: ");
     	   String in_empno = in.readLine();
     	   //database connectivity code
     	   Connection con = DriverManager.getConnection("jdbc:odbc:myodbc;UID=root;PWD=<mypasshere>");

     	   String empno = null;
		   PreparedStatement ps = con.prepareStatement("Select * from employee where empid like '"+empno+" '");
     	   ResultSet rs = ps.executeQuery();
     	   if (rs.next())
     		   System.out.println("No Record exists");
	catch (Exception e) {}
Since am new to java the language itself, I don't know if it is my code that is wrong or the procedure am following for db connectivity.

Using SQLGUI i created the "employee" table in the "test" database.
There are no values in that table because i do not know how to add.

[Can someone please direct me to a simple tutorial on this? for a quick learning in mySQL basics]

I decided to use mysql because the bridge for mdb files provided by easysoft.com is shareware.

please do suggest what is the best , mdb or mysql db for my java program.

am looking forward for help on the java code i pasted. thanks