新手求助,每次ODBC链接数据库,都要登陆SQl server一下

我的链接语句是图片说明
然后 问题是这样图片说明

创建连接池,以mysql为例,自己改成对应的驱动和url
try{
Class.forName('相应Driver');
String url='jdbc:mysql://localhost:3306/数据库名’;
String username='你的用户名';
String password='你的密码';
Connection con=DriverManager.getConnection(url,name,password);
Statement stmt=con.createStatement();
String sql='相关数据库操作语句‘;
Resultset rs=stmt.executeQuery(sql);
while(rs.next())
{
//相应操作
String name=rs.getString('name');
}
rs.close();
stmt.close();
con.close();
}catch(ClassNotFoundException e){
e.printStackTrace();
}catch(SQLException e){
e.printStackException;
}catch(Exeption e){
e.printStackTrace();
}
手打的可能有错,大致是这样