• 大小: 3.1MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-13
  • 语言: Java
  • 标签:

资源简介

基于java开发的教学管理系统,内含数据库文件,只需修改登录数据库密码即可运行,适合于有一定java web基础的兴趣爱好者。

资源截图

代码片段和文件信息

package com;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class TestCon {

/**
 * @param args
 * @throws ClassNotFoundException 
 * @throws IllegalAccessException 
 * @throws InstantiationException 
 */
public static void main(String[] args) throws InstantiationException IllegalAccessException ClassNotFoundException {
// TODO Auto-generated method stub
/*由于我的电脑安装sqlserver后没有开放1433端口,故改用odbc方式连接sqlserver数据库*/
//Class.forName(“com.microsoft.jdbc.sqlserver.SQLServerDriver“).newInstance();
Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver“).newInstance();
//String url=“jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=school“; 
String url = “jdbc:odbc:school“;
//String user=“sa“; 
//String password=“sa“; 
try {
 //Connection conn= DriverManager.getConnection(urluserpassword);
Connection conn = DriverManager.getConnection(url);
Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE
ResultSet.CONCUR_READ_ONLY);

ResultSet rs = stmt.executeQuery(“select * from administrator“);
while(rs.next()){
System.out.println(rs.getobject(1));
System.out.println(rs.getobject(2));
System.out.println(rs.getobject(3));
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();

}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        549  2012-03-21 22:54  school\.classpath

     文件        291  2012-03-21 21:08  school\.mymetadata

     文件       1412  2012-03-21 21:08  school\.project

     文件        500  2012-03-21 21:08  school\.settings\.jsdtscope

     文件         49  2012-03-21 21:08  school\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2012-03-21 21:08  school\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件        895  2012-03-21 21:08  school\src\com\sevenEleven\Beans\CadminBean.java

     文件       9680  2012-03-21 21:08  school\src\com\sevenEleven\Beans\CbestPageBean.java

     文件       1510  2012-03-21 21:08  school\src\com\sevenEleven\Beans\CchooseTestBean.java

     文件        560  2012-03-21 21:08  school\src\com\sevenEleven\Beans\CclassBean.java

     文件        401  2012-03-21 21:08  school\src\com\sevenEleven\Beans\Clesson1Bean.java

     文件        392  2012-03-21 21:08  school\src\com\sevenEleven\Beans\Clesson2Bean.java

     文件       1527  2012-03-21 21:08  school\src\com\sevenEleven\Beans\CstudentBean.java

     文件       1159  2012-03-21 21:08  school\src\com\sevenEleven\Beans\CteacherBean.java

     文件        754  2012-03-21 21:08  school\src\com\sevenEleven\Beans\CtextTestBean.java

     文件       2045  2012-03-21 21:08  school\src\com\sevenEleven\javaBean\admin_test\Cautomakescheme.java

     文件       4020  2012-03-21 21:08  school\src\com\sevenEleven\javaBean\admin_test\CgetCurrentTimeFromTimeClassBegin.java

     文件      10319  2012-03-21 21:08  school\src\com\sevenEleven\javaBean\admin_test\CmakeTeacherAndCourseTogether.java

     文件        587  2012-03-21 21:08  school\src\com\sevenEleven\javaBean\admin_test\CteacherAndLesson1ForClass.java

     文件       1335  2012-03-21 21:08  school\src\com\sevenEleven\javaBean\admin_test\CTimeClassUnit.java

     文件       5547  2012-03-21 22:50  school\src\com\sevenEleven\javaBean\CcheckUser.java

     文件       2176  2012-03-22 08:44  school\src\com\sevenEleven\javaBean\CConnectMSSQL.java

     文件       2680  2012-03-21 21:08  school\src\com\sevenEleven\javaBean\CdataFormat.java

     文件       3297  2012-03-21 22:53  school\src\com\sevenEleven\javaBean\CDBConnection.java

     文件       3120  2012-03-21 21:08  school\src\com\sevenEleven\javaBean\CDBOracle.java

     文件       1754  2012-03-21 21:08  school\src\com\sevenEleven\javaBean\CMethod.java

     文件        252  2012-03-21 21:08  school\src\com\sevenEleven\javaBean\Count.java

     文件       2141  2012-03-21 21:08  school\src\com\sevenEleven\javaBean\CreateTime.java

     文件       3835  2012-03-21 21:08  school\src\com\sevenEleven\javaBean\CseparateTime.java

     文件        485  2012-03-21 21:08  school\src\com\sevenEleven\javaBean\CTimeAndString.java

............此处省略449个文件信息

评论

共有 条评论