String temp=123;
String s= "select intID from ipr_navtable where intParentID=(?)"; //
while(!temp.equals(""))
{
delString+=temp;
try
{
preparedstatement = connection.prepareStatement(s);
preparedstatement.setString(1, temp);
resultset = preparedstatement.executeQuery();
preparedstatement.close();
}
catch(SQLException sqlexception)
{
resultset.close();
preparedstatement.close();
DBConnect.closeConnection(connection);
}
temp="";
while(resultset.next());
{
temp+=","+String.valueOf(resultset.getInt("intID"));
}
}上面是为了找一个点的所有孩子节点 的部分代码
大家看看是在哪里错了
竟然出现java.lang.OutOfMemoryError: Java heap space
错误
String s= "select intID from ipr_navtable where intParentID=(?)"; //
while(!temp.equals(""))
{
delString+=temp;
try
{
preparedstatement = connection.prepareStatement(s);
preparedstatement.setString(1, temp);
resultset = preparedstatement.executeQuery();
preparedstatement.close();
}
catch(SQLException sqlexception)
{
resultset.close();
preparedstatement.close();
DBConnect.closeConnection(connection);
}
temp="";
while(resultset.next());
{
temp+=","+String.valueOf(resultset.getInt("intID"));
}
}上面是为了找一个点的所有孩子节点 的部分代码
大家看看是在哪里错了
竟然出现java.lang.OutOfMemoryError: Java heap space
错误
解决方案 »
- jsp 内建对象何时被创建 何时被销毁
- 关于做网站的一些问题,希望朋友们给解答解答,畅所欲言。。。。
- ******关于胖瘦客户端的讨论******
- cruisecontrol 邮件不能发送
- 求救:jsp怎样取出sql server数据库存储图片(*.bmp),存储类型为image,并在页面中显示该图片
- jsp如何实现,下载完服务器上一个原文件后,把服务器上的原文件删除掉?如何做呢 ?
- 如何输出jsp页面中文本框中的值?
- JAVA applet jar包签名后不能运行
- 如何解决Bean取用<jsp:getProperty>中文无法显示问题?
- 关于jsp汉字显示的问题,求救
- 救命啊 大侠们 JSP连SQLServer2000的问题
- 哪位大侠知道textarea文本域在输入字符的时候就能控制其输入的长度?
intID "10"
intParentID "1,2,3,4,5,6,7,8,9,"SQL:select intID from ipr_navtable where intParentID='1,2,3,4,5,6,7,8,9,';
?????!!!!!晕到极致!!!!!
应该把;去掉
但是 去了后还是有错误
那么在下次查询中就要把2, 3, 4 作为父亲(1) 放入temp中2 有5,6
3 有7,8
4 有9,10那么temp 就 成了5, 6 ,7 ,8,9,10
如此下去找到所有的 1的孩子节点
请问jvm堆是什么
怎么调解呀
就是 当查到1287的孩子1288 1290 1291
temp在查询前变成了(1288,1290,1291)
但是1288的还在1292 就 查不到了问题出在哪里了int intID=1287;
connection = DBConnect.getConnection();
String delString="";
String temp=String.valueOf(intID);
String s= "select intID from ipr_navtable where intParentID in (?)"; //
while(!temp.equals(""))
{
preparedstatement = connection.prepareStatement(s);
preparedstatement.setString(1, temp);
resultset = preparedstatement.executeQuery();
preparedstatement.close();
temp="";
while(resultset.next())
{
temp+=String.valueOf(resultset.getInt("intID"))+",";
}
delString+=temp;
if(temp.length()>0)
temp=temp.substring(0,temp.length()-1);
}
delString=delString.substring(0,delString.length()-1);
DBConnect.closeConnection(connection);%>