Connection conn = null;
        PreparedStatement psts 
= null;
        ResultSet rs 
= null;
        
        
try {
            Class.forName(
"com.mysql.jdbc.Driver");
        }
 catch (ClassNotFoundException e) {
            e.printStackTrace();
        }

        
        
        
try {
            conn 
= DriverManager.getConnection("jdbc:mysql://192.168.1.114:3306/szblcz""root""******");
            psts 
= conn.prepareStatement("select name from tbl_Category where id=?");
            psts.setString(
1"10");
            rs 
= psts.executeQuery();
            
while(rs.next())
            
{
                System.out.println(rs.getString(
1));
            }

        }
 catch (SQLException e) {
            e.printStackTrace();
        }
finally{
            
try {
                rs.close();
                psts.close();
                conn.close();
            }
 catch (SQLException e2) {
                e2.printStackTrace();
            }

        }