#### 登录信息
- 超级管理员(用户名:admin 密码:123)
- 运行前确定你已经成功的安装32位java和配置Access数据源
#### 登陆成功界面
![](https://github.com/uboger/images/blob/master/image/loginin/lbm.gif)
#### 运行环境
- JDK(32位jdk) access是只支持32位(x86)所以必须在32位jdk下运行
- windows mac linux ....
- 数据库(access数据库)
- 使用jdk1.5_x
#### 使用技术
- Java awt 非 swing
- access 数据库
- 数据库驱动 sun.jdbc.odbc.JdbcOdbcDriver
#### 连接数据库代码
- 从access数据库连接代码可以看出access数据库毫无安全可言
```java
public class DbOp{
private static String driver="sun.jdbc.odbc.JdbcOdbcDriver";
/**
*jdbc:odbc:bookdb";
*数据库名称是 bookdb
*
**/
private static String url="jdbc:odbc:bookdb";
private static Connection con=null;
private DbOp(){
try{
if(con==null){
Class.forName(driver);
con=DriverManager.getConnection(url);
}
}catch(Exception e){
JOptionPane.showMessageDialog(null,"数据库未能打开!");
System.out.println(e.getMessage());
}
}
```
#### 入口类
- Login.java 点击登陆按钮的代码
```java
public void sureActionListener(ActionEvent le){
String user=text_user.getText();//从文本框得到输入的用户名和密码
String pass=text_pass.getText();
String is_admin="";
if(user.equals("")||pass.equals("")){
JOptionPane.showMessageDialog(null,"密码不能为空,请输入密码");
return;
}
try{
/**
*数据库核对密码是否正确,正确就登陆成功
*
*/
String sql="select * from user where username="+"'"+user+"'"+"and password="+"'"+pass+"'";
ResultSet rs=DbOp.executeQuery(sql);
if(rs.next()){
is_admin=rs.getString("is_admin");
}else{
JOptionPane.showMessageDialog(null,"Wrong that is UserNmae or Password ");
return;
}
GlobalVar.login_user=user;
ShowMain show=new ShowMain();
show.setRights(is_admin);
System.out.println("Successed");
dispose();
}catch(SQLException e){
JOptionPane.showMessageDialog(null,"the wrong from information");
}
}
```
#### access 数据源配置
- 将uboger/LibraryManager下的“图书管理.mdb” 下载到本地电脑
- 建议不要放在有中文名的路径下
- 下载方法略过
- 打开>控制面板>所有控制面板项>管理工具>ODBC数据源(32位)进行数据源配置
- ![](https://github.com/uboger/images/blob/master/image/access/00.png)
- 用户DNS>添加>选择 Driver do Microsoft Access(*.mdb)项
- ![](https://github.com/uboger/images/blob/master/image/access/1.png)
-
- ![](https://github.com/uboger/images/blob/master/image/access/2.png)
- 对话框填写数据源名为 “bookdb”
- ![](https://github.com/uboger/images/blob/master/image/access/4.png)
- 选择“图书管理.mdb”作为数据源>确定>确定>确定
- ![](https://github.com/uboger/images/blob/master/image/access/5.png)
- ![](https://github.com/uboger/images/blob/master/image/access/6.png)
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
登录信息 - 超级管理员(用户名:admin 密码:123) - 运行前确定你已经成功的安装32位java和配置Access数据源 运行环境 - JDK(32位jdk) access是只支持32位(x86)所以必须在32位jdk下运行 - windows mac linux .... - 数据库(access数据库) - 使用jdk1.5_x 使用技术 - Java awt 非 swing - access 数据库 - 数据库驱动 sun.jdbc.odbc.JdbcOdbcDriver
资源推荐
资源详情
资源评论
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pptx](https://img-home.csdnimg.cn/images/20210720083543.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/TXT.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
共 34 条
- 1
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/4fe0098bbf0f4f10992a1f213d585818_xuezhe5212.jpg!1)
小蜜蜂vs码农
- 粉丝: 2054
- 资源: 265
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)