标题:[求助]编译时冲突,java.exe占CPU百分之90多
取消只看楼主
gwlgqx
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2007-6-2
 问题点数:0 回复次数:0 
[求助]编译时冲突,java.exe占CPU百分之90多

我的代码是这样的:
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection conn= DriverManager.getConnection(url,user,pw);

Statement stmt=conn.createStatement();

String id=request.getParameter("chapters");


String id2=request.getParameter("theme");
String s="select count(*) as n1 from 单选题 where 章节='"+id+"' and 科目='"+id2+"'";
String bdx="select count(*) as n2 from 不定项 where 章节='"+id+"' and 科目='"+id2+"'";
String pdt="select count(*) as n3 from 判断题 where 章节='"+id+"' and 科目='"+id2+"'";
String mcjs="select count(*) as n4 from 名词解释 where 章节='"+id+"' and 科目='"+id2+"'";
String tkt="select count(*) as n5 from 填空题 where 章节='"+id+"' and 科目='"+id2+"'";
String jdt="select count(*) as n6 from 简答题 where 章节='"+id+"' and 科目='"+id2+"'";
String rst="select count(*) as n7 from 论述题 where 章节='"+id+"' and 科目='"+id2+"'";
ResultSet s1=stmt.executeQuery(s);
s1.next();
int ns1=s1.getInt("n1");
out.print(ns1);
...............................
................................
ResultSet s2=stmt.executeQuery(bdx);
s2.next();

int ns2=s2.getInt("n2");
out.print(ns2);
问题是:
这样编译的话就定死了,java占CPU百分之90多
去掉s2.next();
又提示没有找到定点光标
有没有人知道的说一声音好吗,很急

搜索更多相关主题的帖子: java CPU String exe 
2007-10-31 23:42



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-182429-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.838120 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved