




已阅读5页,还剩8页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
balanced and run the satisfaction of the people education. Room XX City Bureau of educational supervision of XX municipality May 6, 2016 County economic information and Business Council System Committee two learn a do learning arrangements specific programme for advance full strictly rule party, according to County Organization Department on County two learn a do learning arrangements of specific programme and I Board learning education implementation programme spirit, according to distinguish level, and has targeted solution problem of requirements, ensure learning education made effectiveness, promote all members consciously respected Constitution, and comply with party rules, with XI General Secretary series important speech spirit armed mind, and guide practice, and Promote the work and be qualified party members and learning arrangements are hereby makes the following specific programmes. Learning requirements, on all party members to study the party Constitution and party rules and unify the XI series of important speech, General Secretary, speech learning series to deepen understanding of the Constitution Party rules, Constitution Party rules in the deep insight series address the basic spirit and practical requirements. 1. Constitution Party rules. Learning of the party Constitution, a deep understanding of the partys nature, purpose, guiding principles, goals, organization, good style, grasp conditions, rights and obligations of party members, bearing in mind that oath, clear qualified party member criteria and conditions. Learning the code of self-discipline of the CPC, the CPCs disciplinary regulations, the Chinese Communist Party Member Rights Ordinance and so on, mastering self-discipline standards of four must, the four upholdings, mastering various types of disciplinary offence and punishment provisions. 2. series spoke. To XI General Secretary series important speech reading (2016 version) and out poverty for basic textbook, learning understand XI General Secretary series important speech of basic spirit, learning understand Central ruling acting political new concept new thought new strategy of basic content, learning understand XI General Secretary in Fujian work during advocate of four grassroots immediately on do drop weak bird first fly and the in Nanping research study proposed of gravity Xia moved, and innovation mechanism, important thought, Master and strengthen the party spirit, fulfills the purpose ideas, moral character, conservation related to the basic requirements. Main understand master following aspects content: (1) ideal faith is Communists spirit Shang of calcium, set right of worldview, and Outlook on life, and values; (2) China dream is national of dream, and national of dream, and people of dream, is Chinese modern yilai most great of dream, core Essentials is national prosperity, and national revitalization, and people happiness; (3) China features Socialist is achieved Chinese great revival of way, enhanced road confidence, and theory confidence, and system confidence; (4) four a full Strategy layout is new of history conditions Xia party ruling acting political total strategy, consciously with four a full led the work; (5) insisted innovation, and coordination, and green, and open, and shared development is relationship China development global of one deep change, according to new development concept do job; (6) practice line Socialist core values, promote Socialist thought moral and Chinese traditional virtue实 验 报 告课程名称: 数据库实验 实验项目: 综合应用 姓 名: 穆光远 指导教师: 成丽君 学 号: 学 院: 软件学院 年级专业: 软件13级 班 级: 1310班 学生成绩: 上课时间: 阅卷评语: 阅卷教师 (签名) 学生管理系统实验报告一 需求分析在如今的高校日常管理当中,学生管理系统就是其中非常重要的一环,特别是当前学生规模大,课程门类多,校区分散等实际情况,学生管理更具有非常大的实际应用意义。但是,我们看到,其实我们学校的学生管理在很多方面做的并不是很完善。管理成为学校教学管理中十分重要又相当复杂的管理工作之一,单纯的采用传统的手工处理已经不符合教育和管理的要求,而计算机具有运算速度快,处理能力强等特点,很自然地进入到这一应用领域中。因此为了保证学校的信息流畅,工作高效,有必要设计一个学生成绩管理系统。这不但能使教务人员从复杂的成绩管理中解脱出来,而且对于推动教学的发展也起到非常重要的作用。二 ER图电话家庭住址联系电话专业年龄班级姓名学号学校学生三 创建数据库的步骤使用SQL创建数据库,如下命令:Create table student(id char(20),name char(20),gender char(2),address char(50),phone char(20),major text(30);四 用JAVA开发系统前端的步骤过程1、学生管理系统主界面(StudentManagement)/核心代码/public class EX12_5_StudentManagement extends JFrame implements ActionListener JMenuBar bar=null; JMenu menu1,menu2,menu3,menu4,menu5; JMenuItem item1,item2,item3,item4,item5; EX12_6_StudentAdd zengjia; EX12_7_StudentQuery chaxun; EX12_8_StudentUpdate gengxin; EX12_9_StudentDelete shanchu; public void actionPerformed(ActionEvent e) if(e.getSource()=item1) this.getContentPane().removeAll();this.getContentPane().add(zengjia,Center);this.getContentPane().repaint(); this.getContentPane().validate(); if(e.getSource()=item2)this.getContentPane().removeAll();this.getContentPane().add(chaxun,Center);this.getContentPane().repaint(); this.getContentPane().validate(); if(e.getSource()=item3)this.getContentPane().removeAll();this.getContentPane().add(gengxin,Center);this.getContentPane().repaint(); this.getContentPane().validate(); if(e.getSource()=item4) this.getContentPane().removeAll();this.getContentPane().add(shanchu,Center);this.getContentPane().repaint(); this.getContentPane().validate(); if(e.getSource()=item5) System.exit(0); public static void main(String args) EX12_5_StudentManagement stuM=new EX12_5_StudentManagement(); stuM.setVisible(true); stuM.addWindowListener(new WindowAdapter() public void windowClosing(WindowEvent e) System.exit(0); ); 2、学生信息录入界面(StudentAdd)/核心代码/EX12_6_StudentAdd() try Class.forName(com.mysql.jdbc.Driver); catch(ClassNotFoundException e) try con=DriverManager.getConnection(jdbc:mysql:/localhost:3306/xskc,root,); sql=con.createStatement(); catch(SQLException ee) public void actionPerformed(ActionEvent e) if(e.getSource()=b1) try insert(); catch(SQLException ee) JOptionPane.showMessageDialog(this,数据已入库!,提示对话框,JOptionPane.INFORMATION_MESSAGE); else if(e.getSource()=b2) tf1.setText( ); tf2.setText( ); tf3.setText( ); tf4.setText( ); tf5.setText( ); tf6.setText( ); public void insert() throws SQLException String s1=+tf1.getText().trim()+; String s2=+tf2.getText().trim()+; String s3=+tf3.getText().trim()+; String s4=+tf4.getText().trim()+; String s5=+tf5.getText().trim()+; String s6=+tf6.getText().trim()+; con=DriverManager.getConnection(jdbc:mysql:/localhost:3306/xskc,root,); String temp=INSERT INTO student VALUES (+s1+,+s2+,+s3+,+s4+,+s5+,+s6+); sql.executeUpdate(temp); con.close(); 3、学生信息查询界面(StudentQuery)/核心代码/EX12_7_StudentQuery() try Class.forName(com.mysql.jdbc.Driver); catch(ClassNotFoundException e) try con=DriverManager.getConnection(jdbc:mysql:/localhost:3306/xskc,root,); sql=con.createStatement(); catch(SQLException ee) public void actionPerformed(ActionEvent e) flag=0; tryquery(); catch(SQLException ee) public void query() throws SQLException String num,name,gender,address,phone,major; con=DriverManager.getConnection(jdbc:mysql:/localhost:3306/xskc,root,); num=t1.getText().trim(); ResultSet rs=sql.executeQuery(SELECT * FROM student where id=+num+); if(rs.next() /num=rs.getString(ID); name=rs.getString(name); gender=rs.getString(gender); address=rs.getString(address); phone=rs.getString(phone); major=rs.getString(major); /if(num.equals(t1.getText().trim() t2.setText(name); t3.setText(gender); t4.setText(address); t5.setText(phone); t6.setText(major); flag=1; /break; / else JOptionPane.showMessageDialog(this,没有该学生!,提示对话框,JOptionPane.INFORMATION_MESSAGE); con.close(); if(flag=0)t1.setText(没有该学生); 4、学生信息更新界面(StudentUpdate)/核心代码/EX12_8_StudentUpdate() try Class.forName(com.mysql.jdbc.Driver); catch(ClassNotFoundException e) try con=DriverManager.getConnection(jdbc:mysql:/localhost:3306/xskc,root,); sql=con.createStatement(); catch(SQLException ee) public void actionPerformed(ActionEvent e) if(e.getSource()=b1) try String num,name,gender,address,phone,major; con=DriverManager.getConnection(jdbc:mysql:/localhost:3306/xskc,root,); num=t1.getText().trim(); ResultSet rs=sql.executeQuery(SELECT * FROM student where id=+num+); if(rs.next() /num=rs.getString(id); name=rs.getString(name); gender=rs.getString(gender); address=rs.getString(address); phone=rs.getString(phone); major=rs.getString(major); /if(num.equals(t1.getText().trim() t2.setText(name); t3.setText(gender); t4.setText(address); t5.setText(phone); t6.setText(major); /break; / else JOptionPane.showMessageDialog(this,没有该学生!,提示对话框,JOptionPane.INFORMATION_MESSAGE); con.close(); catch(SQLException ee) if(e.getSource()=b2) tryupdate(); catch(SQLException ee) if(e.getSource()=b3) t2.setText( ); t3.setText( ); t4.setText( ); t5.setText( ); t6.setText( ); public void update() throws SQLException String s1=+t1.getText().trim()+; String s2=+t2.getText().trim()+; String s3=+t3.getText().trim()+; String s4=+t4.getText().trim()+; String s5=+t5.getText().trim()+; String s6=+t6.getText().trim()+; String temp=UPDATE student SET name =+s2+, gender=+s3+, address=+s4+, phone=+s5+, major=+s6+ WHERE id=+s1; con=DriverManager.getConnection(jdbc:mysql:/localhost:3306/xskc, root, ); sql.executeUpdate(temp); JOptionPane.showMessageDialog(this,修改成功!,提示对话框,JOptionPane.INFORMATION_MESSAGE); con.close(); 5、学生信息删除界面(StudentDelete)/核心代码/EX12_9_StudentDelete() try Class.forName(com.mysql.jdbc.Driver); catch (ClassNotFoundException e) try con = DriverManager.getConnection(jdbc:mysql:/localhost:3306/xskc, root, );sql = con.createStatement(); catch (SQLException ee) public void actionPerformed(ActionEvent e) if (e.getSource() = t1) try delete(); catch (SQLException ee) else if (e.getSource() = b) try delete(); catch (SQLException ee) int n = JOptionPane.showConfirmDialog(this, 确定要删除该学生的全部信息吗?,确定, JOptionPane.YES_NO_OPTION);if (n = JOptionPane.YES_OPTION) try String s1 = + t1.getText().trim() + ;String temp = DELETE FROM student WHERE id= + s1;System.out.println(temp);con = DriverManager.getConnection(jdbc:mysql:/localhost:3306/xskc, root, );sql.executeUpdate(temp);JOptionPane.showMessageDialog(this, 删除成功!, 提示对话框,JOptionPane.INFORMATION_MESSAGE);con.close(); catch (SQLException ee) else if (n = JOptionPane.NO_OPTION) public void delete() throws SQLException String num, name, gender, address, phone, major;con = DriverManager.getConnection(jdbc:mysql:/localhost:3306/xskc, root, );num = t1.getText().trim();ResultSet rs = sql.executeQuery(select * FROM student where id=+ num + );if (rs.next() / num=rs.getString(id);name = rs.getString(name);gender = rs.getString(gender);address = rs.getString(address);phone = rs.getString(phone);major = rs.getString(major);/ if(num.equals(t1.getText().trim()t2.setText(name);t3.setText(gender);t4.setText(address);t5.setText(phone);t6.setText(major);/ break;/ else JOptionPane.showMessageDialog(this, 没有该学生!, 提示对话框,JOptionPane.INFORMATION_MESSAGE);con.close();五 连接数据库步骤各步骤简单描述如下:(1)加载驱动程序。为数据库管理系统加载一个JDBC驱动程序。通过 Class.forName()方法调用来完成这一操作,需要给出驱动类的名称。(2)打开数据库连接。使用驱动程序打开特定数据库的连接。(3)获取Statement对象。(4)执行SQL语句。通过Statement提出SQL请求。(5)处理结果集。如果返回结果集则对结果集进行处理。(1)加载驱动程序通过类装载器来加载相应的数据库驱动程序,格式为:Class.forName(driverName)import java.sql.*;public class EX12_1_StudentSQL public static void main(String args) Connection con=null; Statement stmt=null; String strTemp = ;try Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); catch(ClassNotFoundException e)(2)建立连接 通过DriverManager: Connection con=DriverManager.getConnection(url,user,password); (3)获取statementstatement用来发送要执行的sql语句。有三种Statement对象。Statement执行不带参数的sql语句。创建方法:connection.createStatement() PreParedStatement执行带参数或不带参数的预编译的SQL语句,下次执行的时候就不要编译和优化了。 创建方法:只有SELECT语句才会有结果集返回。代码片断如下:while(rs.next()/rs是一个游标,初始时在第一条记录的上面一行。/每next一次,向下一行。rs.getString(1);rs.getInt(2); 可以使用位置标识,也可以使用列名来标识(当结果集字段比较多的时候用列名标识法,可以增强程序的可读性)。最终代码import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;/* * 1首先要安装有JDK。 * 2然后安装MySQL。 * 3配置好这两个环境后,下载JDBC驱动mysql-connector-java-5.0.5.zip。 * 然后将其解压缩到任一目录。然后将其目录下的mysql-connector-java-5.0.5-bin.jar加到classpath里, * 4环境配置好了。现在,先配置Java连接MySQL,设其用户名为“root”,密码为“”。 * 在命令行或用一个SQL的前端软件创建Database。 * author hj * */public class JDBCTest public static Connection getConnection() String driver=com.mysql.jdbc.Driver; /获取mysql数据库的驱动类 String url=jdbc:mysql:/localhost:3306/xskc; /连接数据库(test是数据库名) String name=root;/连接mysql的用户名 String pwd=;/连接mysql的密码 try Class.forName(driver); /1. 加载驱动程序 Connection conn=DriverManager.getConnection(url,name,pwd);/2. 打开数据库连接 return conn; catch(ClassNotFoundException e) e.printStackTrace(); return null; catch(SQLException e) e.printStackTrace(); return null; public static void closeAll(Connection conn,PreparedStatement ps,ResultSet rs) try if(rs!=null) rs.close(); catch(SQLException e) e.printStackTrace(); try if(ps!=null) ps.close(); catch(SQLException e) e.printStackTrace(); try if(conn!=null) conn.close(); catch(SQLException e) e.printStackTrace(); public static void main(String args) throws SQLException Connection cc=JDBCTest.getConnection(); if(!cc.isClosed() System.out.println(Succeeded connecting to the Database!); Statement statement = cc.createStatement(); /3. 获取statement对象 String sql = select * from student; ResultSet rs = statement.executeQuery(sql); /4. 执行SQL语句 while(rs.next() /5. 处理结果集 System.out.println(rs.getString(Sno)+); 六 小结数据库的时候出现了错误:1 Connection refused(DESCRIPTION=(TMP=)(VSNNUM=)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)dbc连接数据库的时候,需要使用数据库的sid_name,而不是数据库的services_name而使用plsql连接数据库的时候,只需要数据库的services_name即可,所以修改连接字符串中的services_name 为sid_name2 JDBC操作ORACLE数据库时出现java.sql.SQLException:IO异常,不在流模式下 解决方法setAutoCommit失败,该连接并重新建立一个连接3 在学生信息系统录入,查询,更新的代码中,最后的sql.executeQuerty(temp);改为sql.executeUqdate(temp);此时就能正常执行程序功能了。本实验的教学目的是使学生在了解与掌握物联网基本架构、物联网关键技术以及物联网发展现状的基础上,通过对物联网在诸多典型领域应用的深度学习与分析总结,使学生对物联网的应用有真实全面的认识full strictly rule party is all members common responsibility, must implementation to each branch and each name members. 3 . Play a vanguard and exemplary role in life. Keep to the correct political orientation, political sensitivity and political judgment, dare to fight against all kinds of wrong thought, wrong words and deeds. (2) firmly establish consciousness of the party, the party members consciousness. Focus on some party members sense of organization and discipline, they do not participate in the Organization, is not required to pay membership dues for a long time, do not play a vanguard and exemplary role, some dont even mention membership, fail to make a distinction between right and wrong, failing to observe political discipline and rules, and so on. Always keep in mind that he is a Communist, strengthen party spirit, listening party, party, party, party, party party guarding party, at the party, the party for the party. (3) strengthening the consciousness of the partys purpose. Focus on peoples conception of some party members, lack of sense of service, do not care for the masses did not take the in
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年自考专业(小学教育)测试卷附参考答案(基础题)
- 2025年期货从业资格之《期货法律法规》考前冲刺测试卷包及参考答案详解(黄金题型)
- 2025年法院司法辅助人员模拟题库附参考答案详解【轻巧夺冠】
- 农发行昭通市威信县2025秋招笔试综合模拟题库及答案
- 农发行南阳市社旗县2025秋招群面模拟题及高分话术
- 农发行娄底市新化县2025秋招数据分析师笔试题及答案
- 紫金县2025广东河源紫金县残疾人康复中心招聘编外人员1人笔试历年参考题库附带答案详解
- 职业技能培训企业实践报告
- 心理健康促进管理规定报告制定
- 创新交流规定制度
- 2025贵州民航产业集团有限公司社会招聘考试参考试题及答案解析
- 2025年江西省高考物理试卷真题(含答案及解析)
- 高三励志课件
- 河南省人民医院2025年护士规范化培训招生考试参考题库及答案解析
- 防消联勤课件
- 绿色交通系统无人驾驶车辆示范项目可行性研究报告
- 2025年领导干部政治理论知识竞赛题库及答案
- 2025国庆中秋节前安全教育
- 东北三省2025~2026学年度上学期高考单元检测示范卷 数学(选择性必修第一册 人教版 第1章)(含答案)
- 读书的力量课件
- 输电线路工程冬季施工方案
评论
0/150
提交评论