public String getAllTransponderfortree()
{
ArrayList noticeList = new ArrayList();
try{
conn = ConnectionDB.getConnection();
stmt = conn.createStatement();
String sql = "select transponderid from TBTRANSPONDER";
rs = stmt.executeQuery(sql);
conn1 = ConnectionDB.getConnection();
stmt1 = conn.createStatement();
String strTree = "";
while(rs.next())
{
String strID=rs.getString("transponderid");
String sqlResult = "select SCGID from TBSCG where transponderid== '"+strID+"'";
rs1 = stmt1.executeQuery(sqlResult);
while(rs1.next())
{
String strSCGID=rs.getString("SCGID");
strTree = strTree + "<node label=\" Transport ID : "+strID+"\">"+"<node label=\" SCGID :"+strSCGID+"\"/>"+"</node>";
}
}
return strTree;
}
catch(SQLException e)
{
e.printStackTrace();
return null;
}
}
{
ArrayList noticeList = new ArrayList();
try{
conn = ConnectionDB.getConnection();
stmt = conn.createStatement();
String sql = "select transponderid from TBTRANSPONDER";
rs = stmt.executeQuery(sql);
conn1 = ConnectionDB.getConnection();
stmt1 = conn.createStatement();
String strTree = "";
while(rs.next())
{
String strID=rs.getString("transponderid");
String sqlResult = "select SCGID from TBSCG where transponderid== '"+strID+"'";
rs1 = stmt1.executeQuery(sqlResult);
while(rs1.next())
{
String strSCGID=rs.getString("SCGID");
strTree = strTree + "<node label=\" Transport ID : "+strID+"\">"+"<node label=\" SCGID :"+strSCGID+"\"/>"+"</node>";
}
}
return strTree;
}
catch(SQLException e)
{
e.printStackTrace();
return null;
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货