资源简介

JSP 校园 校务 管理 系统 JSP 校园 校务 管理 系统

资源截图

代码片段和文件信息

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();

}

}

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

     文件        832  2009-04-30 23:13  329t\schooljw\.classpath

     文件        291  2009-05-01 10:47  329t\schooljw\.mymetadata

     文件       1224  2009-05-01 10:47  329t\schooljw\.project

     文件         79  2008-09-10 13:53  329t\schooljw\CodeFans.net.url

     文件        895  2007-05-12 17:23  329t\schooljw\src\com\sevenEleven\Beans\CadminBean.java

     文件       9680  2007-05-12 17:23  329t\schooljw\src\com\sevenEleven\Beans\CbestPageBean.java

     文件       1510  2007-05-13 14:45  329t\schooljw\src\com\sevenEleven\Beans\CchooseTestBean.java

     文件        560  2007-05-12 17:23  329t\schooljw\src\com\sevenEleven\Beans\CclassBean.java

     文件        401  2007-05-12 17:23  329t\schooljw\src\com\sevenEleven\Beans\Clesson1Bean.java

     文件        392  2007-05-12 17:23  329t\schooljw\src\com\sevenEleven\Beans\Clesson2Bean.java

     文件       1527  2007-05-12 17:23  329t\schooljw\src\com\sevenEleven\Beans\CstudentBean.java

     文件       1159  2007-05-12 17:23  329t\schooljw\src\com\sevenEleven\Beans\CteacherBean.java

     文件        754  2007-05-12 17:23  329t\schooljw\src\com\sevenEleven\Beans\CtextTestBean.java

     文件         79  2008-09-10 13:53  329t\schooljw\src\com\sevenEleven\CodeFans.net.url

     文件       2045  2007-05-12 17:23  329t\schooljw\src\com\sevenEleven\javaBean\admin_test\Cautomakescheme.java

     文件       4020  2007-05-12 17:23  329t\schooljw\src\com\sevenEleven\javaBean\admin_test\CgetCurrentTimeFromTimeClassBegin.java

     文件      10319  2007-05-13 19:49  329t\schooljw\src\com\sevenEleven\javaBean\admin_test\CmakeTeacherAndCourseTogether.java

     文件        587  2007-05-12 17:23  329t\schooljw\src\com\sevenEleven\javaBean\admin_test\CteacherAndLesson1ForClass.java

     文件       1335  2007-05-12 17:23  329t\schooljw\src\com\sevenEleven\javaBean\admin_test\CTimeClassUnit.java

     文件       5502  2009-05-01 12:27  329t\schooljw\src\com\sevenEleven\javaBean\CcheckUser.java

     文件       2185  2009-05-01 10:31  329t\schooljw\src\com\sevenEleven\javaBean\CConnectMSSQL.java

     文件       2680  2007-05-12 17:23  329t\schooljw\src\com\sevenEleven\javaBean\CdataFormat.java

     文件       3281  2009-05-01 00:37  329t\schooljw\src\com\sevenEleven\javaBean\CDBConnection.java

     文件       3120  2009-05-01 10:34  329t\schooljw\src\com\sevenEleven\javaBean\CDBOracle.java

     文件       1754  2007-05-13 09:34  329t\schooljw\src\com\sevenEleven\javaBean\CMethod.java

     文件        252  2007-05-12 17:23  329t\schooljw\src\com\sevenEleven\javaBean\Count.java

     文件       2141  2007-05-13 18:56  329t\schooljw\src\com\sevenEleven\javaBean\CreateTime.java

     文件       3835  2007-05-12 17:23  329t\schooljw\src\com\sevenEleven\javaBean\CseparateTime.java

     文件        485  2007-05-12 17:23  329t\schooljw\src\com\sevenEleven\javaBean\CTimeAndString.java

     文件      24657  2007-05-13 15:46  329t\schooljw\src\com\sevenEleven\javaBean\exam\Cexam.java

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

评论

共有 条评论