关于JAVA学生成绩管理系统问题
现在需要在一个显示TABLE的界面在查询窗口输入对应的学号,刷星JTable,出现对应的数据。我现在弄纠结啊。不知道怎么刷新。我弄了一下报错已生成用于更新的ResultS...
现在需要在一个显示TABLE的界面 在查询窗口输入对应的学号,刷星JTable,出现对应的数据。我现在弄纠结啊。不知道怎么刷新。我弄了一下 报错
已生成用于更新的 ResultSet。
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(Unknown Source)
at com.ccniit.model.Tea.Teacher.TeaTeaDAO.findStu(TeaTeaDAO.java:57)
at com.ccniit.model.Tea.Teacher.TeaTeaTableModel.findRow(TeaTeaTableModel.java:74)
at com.ccniit.view.TeaFram.teacher.TeTeaFrame.findTeacher(TeTeaFrame.java:95)
at com.ccniit.view.TeaFram.teacher.TeTeaFrame$1.actionPerformed(TeTeaFrame.java:72)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source) 展开
已生成用于更新的 ResultSet。
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(Unknown Source)
at com.ccniit.model.Tea.Teacher.TeaTeaDAO.findStu(TeaTeaDAO.java:57)
at com.ccniit.model.Tea.Teacher.TeaTeaTableModel.findRow(TeaTeaTableModel.java:74)
at com.ccniit.view.TeaFram.teacher.TeTeaFrame.findTeacher(TeTeaFrame.java:95)
at com.ccniit.view.TeaFram.teacher.TeTeaFrame$1.actionPerformed(TeTeaFrame.java:72)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source) 展开
5个回答
展开全部
你先确定是否能连上数据库,如果能够连上的话再检查能不能取到数据,能取到的话再看能不能输出到界面,你得确定是哪个环节出问题了才能去处理, Debug一下试试 如果你不明白这个流程的话应该先把这个弄懂,呵呵.
追问
228491282QQ 加我可以不。。。我快疯了。,。
做项目。。。想了一上午了这个。。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
是不是一个文本框 一个按钮 还有一个表格的形式???如果是你就用按钮的事件啊 获取文本框输入 去后台或许数据 然后用表格的MODEL 先remove以前的 再 add才查询出来的
追问
好迷茫啊。。。
追答
额。。。
public JButton getButton() {
if (button == null) {
button = new JButton();
button.setText("查询");
button.addActionListener(new ActionListener(){
public void actionPerformed(java.awt.event.ActionEvent e) {
for (int i = getModel().getRowCount(); i > 0; i--) {
getModel().removeRow(i - 1);
}
Vector v = CreateDataForSV.getSvbyDate(getSecletDate());
for (int i = 0; i < v.size(); i++) {
Vector vec=(Vector)v.get(i);
vec.add(0, i+1);
model.addRow(vec);
}
}
});
}
return button;
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
依靠Baiduhi联系
有时间能处理你的题目
我们可以根据本要求提供一份相当于学生水平的源代码
6 | ES:\\7E135E484F6FA7B7B6149AE96DA701B2
5 | 交易提醒:预付定金有风险
7 |
1 | 北京易软个人软件
5 | 全职软件开发团队
6 | 十年信誉铸成品质
1 | 速度专业积累效率
5 | 开发信息管理系统更有优惠
有时间能处理你的题目
我们可以根据本要求提供一份相当于学生水平的源代码
6 | ES:\\7E135E484F6FA7B7B6149AE96DA701B2
5 | 交易提醒:预付定金有风险
7 |
1 | 北京易软个人软件
5 | 全职软件开发团队
6 | 十年信誉铸成品质
1 | 速度专业积累效率
5 | 开发信息管理系统更有优惠
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
是你使用JDBC出错了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询