资源简介
完整的宿舍管理系统,用JAVA编写的,SQL数据库,全套资料齐全。
代码片段和文件信息
/*
* To change this template choose Tools | Templates
* and open the template in the editor.
*/
package Database;
import java.sql.*;
/**
*
* @author Administrator
*/
public class Academy {
public static Connection connectionused1;
public static Statement stateused1;
public static ResultSet result1;
public static void main(String []args){
try{
Class.forName(“com.microsoft.jdbc.sqlserver.SQLServerDriver“);
}
catch(Exception e) {
System.out.println(“Can‘t load JDBC Driver. “ +
“Make sure classpath is correct“);
return;
}
String url = “jdbc:microsoft:sqlserver://localhost:1433“;
String usersign = “sa“;
String usercode = ““;
Connection connection;
try {
connection = DriverManager.getConnection(url usersign usercode);
}
catch (SQLException e) {
System.out.println(“Connect problem: “ + e.getMessage());
return;
}
try{
Statement statement = connection.createStatement();
statement.executeUpdate(
“create table Seminary(“+
“ seminaryname varchar(20) primary key“ +
“ seminarynum varchar(4)“ +
“ seminaryridge varchar(4))“);
}
catch(SQLException e){
System.out.println(“An SQLException occurred :“ + e.getMessage());
}
catch(Exception e){
e.printStackTrace(System.err);
}
}
public static void Connection(){
try{
Class.forName(“com.microsoft.jdbc.sqlserver.SQLServerDriver“);
}
catch(Exception e) {
System.out.println(“Can‘t load JDBC Driver. “ +
“Make sure classpath is correct“);
return;
}
String url = “jdbc:microsoft:sqlserver://localhost:1433“;
String usersign = “sa“;
String usercode = ““;
try {
connectionused1 = DriverManager.getConnection(url usersign usercode);
}
catch (SQLException e) {
System.out.println(“Connect problem: “ + e.getMessage());
return;
}
try{
stateused1 = connectionused1.createStatement();
}
catch(SQLException e){
System.out.println(“An SQLException occurred :“ + e.getMessage());
}
catch(Exception e){
e.printStackTrace(System.err);
}
}
public static boolean InsertAcademy(String AcademynameString AcademynumString Academyridge){
try{
Class.forName(“com.microsoft.jdbc.sqlserver.SQLServerDriver“);
}
catch(Exception e) {
System.out.println(“Can‘t load JDBC Driver. “ +
“Make sure classpath is correct“);
return false;
}
String url = “jdbc:microsoft:sqlserver://localhost:1433“;
String usersign = “sa“;
String usercode = ““;
Connection connection;
try {
connection = DriverManager.getConnection(url usersign usercode);
}
catch (SQLException e) {
System.out.println(“Connect problem: “ +
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
I.A.... 25 2009-07-01 18:39 StuApartManageSystem终极版\src\conf\MANIFEST.MF
I.A.... 3524 2009-07-03 17:45 StuApartManageSystem终极版\src\java\Databa
I.A.... 3748 2009-07-03 20:54 StuApartManageSystem终极版\src\java\Databa
I.A.... 3836 2009-07-03 15:04 StuApartManageSystem终极版\src\java\Databa
I.A.... 3508 2009-07-04 14:16 StuApartManageSystem终极版\src\java\Databa
I.A.... 3852 2009-07-04 14:03 StuApartManageSystem终极版\src\java\Databa
I.A.... 3871 2009-07-03 16:06 StuApartManageSystem终极版\src\java\Databa
I.A.... 25597 2009-07-03 01:37 StuApartManageSystem终极版\web\123.jpg
I.A.... 875 2009-07-03 23:11 StuApartManageSystem终极版\web\AddAcademy.jsp
I.A.... 755 2009-07-03 17:38 StuApartManageSystem终极版\web\AddAcademyFalse.jsp
I.A.... 988 2009-07-04 13:44 StuApartManageSystem终极版\web\AddAcademySured.jsp
I.A.... 791 2009-07-03 13:24 StuApartManageSystem终极版\web\Addadminsuccessed.jsp
I.A.... 889 2009-07-04 13:36 StuApartManageSystem终极版\web\AddSpecial.jsp
I.A.... 755 2009-07-04 13:36 StuApartManageSystem终极版\web\AddSpecialFalse.jsp
I.A.... 999 2009-07-04 13:42 StuApartManageSystem终极版\web\AddSpecialSured.jsp
I.A.... 1133 2009-07-04 14:03 StuApartManageSystem终极版\web\AddStudent.jsp
I.A.... 715 2009-07-04 14:06 StuApartManageSystem终极版\web\AddStudentFalse.jsp
I.A.... 1190 2009-07-04 14:06 StuApartManageSystem终极版\web\AddStuSured.jsp
I.A.... 935 2009-07-05 19:56 StuApartManageSystem终极版\web\adminmesg.jsp
I.A.... 1055 2009-07-04 15:14 StuApartManageSystem终极版\web\amspecial.jsp
I.A.... 1199 2009-07-04 15:19 StuApartManageSystem终极版\web\amstudents.jsp
I.A.... 104363 2009-07-01 19:40 StuApartManageSystem终极版\web\Apartment.jpg
I.A.... 981 2009-07-03 19:17 StuApartManageSystem终极版\web\checksbmesg.jsp
I.A.... 907 2009-07-04 13:21 StuApartManageSystem终极版\web\DelAcademy.jsp
I.A.... 745 2009-07-04 14:18 StuApartManageSystem终极版\web\delspecial.jsp
I.A.... 917 2009-07-04 14:16 StuApartManageSystem终极版\web\DelSpecial1.jsp
I.A.... 745 2008-06-26 19:31 StuApartManageSystem终极版\web\delstudent.jsp
I.A.... 863 2008-06-26 19:24 StuApartManageSystem终极版\web\DelStudents.jsp
I.A.... 660 2008-06-26 18:56 StuApartManageSystem终极版\web\enrolsuccess.jsp
I.A.... 3136 2009-07-02 21:26 StuApartManageSystem终极版\web\enrolvisitor.jsp
............此处省略52个文件信息
- 上一篇:端对端加密js+java
- 下一篇:java图片压缩处理可以压缩为任意大小
评论
共有 条评论