Hi
thanks for your reply.
i fprgot to put main().
now i'm getting this error:
Exception java.lang.ClassNotFoundException must be caught, or it must be declared in the throws clause of this constructor.
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver");
here is the java file:
import java.sql.*;
public class myJdbc
{
public myJdbc()
{
String url="jdbc

dbc:sample";
String query= "SELECT * FROM PERSON ";
//boolean more;
Statement stmt ;
try
{
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =DriverManager.getConnection(url,"matt","matt");
stmt= con.createStatement();
ResultSet rs = stmt.executeQuery(query);
//while(more = rs.next())
while( rs.next())
{
int number = rs.getInt("PERSON#");
String firstName = rs.getString("FIRST");
String lastName = rs.getString("LAST");
System.out.println(number + " " + firstName + " " + lastName);
}
rs.close();
stmt.close();
con.close();
}
catch(SQLException ex )
{
ex.printStackTrace();
}
}
public static void main(String args[])
{
myJdbc my = new myJdbc();
}
}
Thanks again for your time.