package classes;
import java.sql.*;
public class conn {
	String sDBDriver = "sun.jdbc.odbc.JdbcOdbcDriver";
	Connection connect = null;
	ResultSet rs = null;
	public conn(){
	  try {
		Class.forName(sDBDriver);
	} catch (ClassNotFoundException e) {
		e.printStackTrace();
	}
	}
    public ResultSet executeQuery(String sql){
    	try {
			connect = DriverManager.getConnection("jdbc:odbc:nbos","","");
		    Statement stmt = connect.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
		    rs = stmt.executeQuery(sql);
    	} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    	return rs;
    }
}
