package regist;
import java.sql.*;
public class conn
{
  String sDBDriver="sun.jdbc.odbc.JdbcOdbcDriver";
  String sConnStr="jdbc:odbc:regist";
  Connection connect=null;
  ResultSet rs=null;
  public conn()
  {
    try
    { Class.forName(sDBDriver);}
    catch(java.lang.ClassNotFoundException e)
    {System.err.println(e.getMessage());}
  }
  public ResultSet executeQuery(String sql)
  {
    rs=null;
    try
     {
       connect=DriverManager.getConnection(sConnStr);
       Statement stmt=connect.createStatement();
       rs=stmt.executeQuery(sql);
     }  
   catch(SQLException ex)
   {System.err.println(ex.getMessage());}
   return rs;
  }
}