I am trying to make a connection pooling for my web application but don't know basics how to setup with sql server with it
Main questions: what is resource type (What to write), classname, driverclass name?
public static void main(String[] args) throws ClassNotFoundException, SQLException {
String str="SELECT * from Book";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
try {
Connection con = DriverManager.getConnection("jdbc:odbc:lol","Sar\\KILLER_GUY",null);
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(str);
System.out.println("SalesPerson Id: ");
while(rs.next())
{
String id= rs.getString("Add");
System.out.println(id);
}
con.close();
}
catch(SQLException e)
{
}