try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException e1)
{
System.out.println(e1.getMessage());
}
try
{
Connection con=DriverManager.getConnection("jdbc:odbc:yuli");
Statement sql=con.createStatement();
String str1=tde1.getText().trim();
String str2=tde2.getText().trim();
System.out.println("111");
ResultSet rs=sql.executeQuery("select 借入时间,还入时间,备注 from shujubiao where 借阅者='str1' and 电影名称='str2'");
System.out.println("222");
if(!rs.equals(null))
{
rs.first();
tde3.setText(rs.getString("借入时间"));
tde4.setText(rs.getString("还入时间"));
tde5.setText(rs.getString("备注"));}
pack();
con.close();
}
catch(SQLException e2)
{
System.out.println(e2.getMessage());
}我上面的方法里怎么得不到呢,错在那里呢?