资源简介
在线小说完整的系统,能运行,JSP+MYsql在线小说网
代码片段和文件信息
package com.ch7.common;
import java.sql.*;
/**
* 鏁版嵁搴撹繛鎺ョ被
*/
public class Conn {
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
/**
* 鍔犺浇椹卞姩绋嬪簭
* */
public Conn() {
try {
Class.forName(“com.mysql.jdbc.Driver“);
} catch (java.lang.ClassNotFoundException e) {
System.err.println(e.getMessage());
}
}
/**
* 鎵ц鏌ヨ鎿嶄綔锛歴elect
* */
public ResultSet executeQuery(String sql) {
try {
conn = DriverManager
.getConnection(
“jdbc:mysql://localhost:3306/bookdb?useUnicode=true&characterEncoding=UTF-8“
“root“ “123456“);
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
} catch (SQLException ex) {
System.err.println(ex.getMessage());
}
return rs;
}
/**
* 鎵ц鏇存柊鎿嶄綔锛歩nsert銆乽pdate銆乨elete
* */
public int executeUpdate(String sql) {
int result = 0;
try {
conn = DriverManager
.getConnection(
“jdbc:mysql://localhost:3306/bookdb?useUnicode=true&characterEncoding=UTF-8“
“root“ “123456“);
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE
ResultSet.CONCUR_READ_ONLY);
result = stmt.executeUpdate(sql);
} catch (SQLException ex) {
result = 0;
}
return result;
}
/**
* 鍏抽棴鏁版嵁搴撹繛鎺�
* */
public void close() {
try {
if (rs != null)
rs.close();
} catch (Exception e) {
e.printStackTrace(System.err);
}
try {
if (stmt != null)
stmt.close();
} catch (Exception e) {
e.printStackTrace(System.err);
}
try {
if (conn != null) {
conn.close();
}
} catch (Exception e) {
e.printStackTrace(System.err);
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-11-12 17:20 在线小说\
文件 529 2014-06-21 17:57 在线小说\.classpath
目录 0 2014-11-12 17:20 在线小说\.myeclipse\
文件 279 2014-11-14 10:59 在线小说\.myme
文件 1612 2014-11-12 17:54 在线小说\.project
目录 0 2014-11-12 17:20 在线小说\.settings\
文件 522 2014-05-20 11:21 在线小说\.settings\.jsdtscope
文件 423 2014-05-20 11:21 在线小说\.settings\com.genuitec.eclipse.migration.prefs
文件 77 2014-05-20 11:21 在线小说\.settings\org.eclipse.core.resources.prefs
文件 364 2014-05-20 11:21 在线小说\.settings\org.eclipse.jdt.core.prefs
文件 450 2014-06-21 17:57 在线小说\.settings\org.eclipse.wst.common.component
文件 252 2014-06-21 17:58 在线小说\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2014-06-21 17:58 在线小说\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2014-06-21 17:58 在线小说\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 11761 2014-05-20 11:21 在线小说\blogdb.sql
目录 0 2014-11-12 17:20 在线小说\src\
目录 0 2014-11-12 17:20 在线小说\src\com\
目录 0 2014-11-12 17:20 在线小说\src\com\ch7\
目录 0 2014-11-12 17:20 在线小说\src\com\ch7\common\
文件 1796 2014-11-12 17:24 在线小说\src\com\ch7\common\Conn.java
文件 2312 2014-05-20 11:21 在线小说\src\com\ch7\common\DataConverter.java
文件 3545 2014-05-20 11:21 在线小说\src\com\ch7\common\DataValidator.java
文件 1401 2014-05-20 11:21 在线小说\src\com\ch7\common\MD5.java
文件 2416 2014-05-20 11:21 在线小说\src\com\ch7\common\Utility.java
目录 0 2014-11-12 17:20 在线小说\src\com\ch7\dal\
文件 3868 2014-11-14 11:00 在线小说\src\com\ch7\dal\Blog.java
文件 2195 2014-05-20 11:21 在线小说\src\com\ch7\dal\Class.java
文件 3357 2014-05-20 11:21 在线小说\src\com\ch7\dal\Comment.java
文件 3869 2014-05-20 11:21 在线小说\src\com\ch7\dal\Users.java
目录 0 2014-11-12 17:20 在线小说\src\com\ch7\model\
文件 1153 2014-11-14 10:59 在线小说\src\com\ch7\model\BlogInfo.java
............此处省略560个文件信息
相关资源
- 美食天下项目Android版源码和Web版源码
- JSP企业人事管理系统设计(源代码+论
- java代码编写将excel数据导入到mysql数据
- 实现一个图书管理系统
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- JSP,SQL,MVC的选课系统
- 基于JSP的学生宿舍管理系统(源码 数
- JSP选课管理系统
- mysql jsp网站源码下载
- JSP做的化妆品商城
- Jsp购物车实例
- 基于JSP的校友信息管理系统(添加数
- 基于jsp的bbs论坛 非常详细
- jsp oracle通讯录
- JSP学生信息管理系统 Mysql数据库
- 使用jsp servlet做的投票系统
- android通过JDBC连接Mysql数据库
- JSP登陆验证 实现JSP用户名 密码 验
- jsp基于servlet 图书馆管理系统
- jsp学生成绩管理系统.rar
- 在线考试系统源代码(jsp)
- 超级好的纯jsp写的聊天室
- JSP 网上购物网页项目
- JSP+mysql新闻发布系统.rar
- jsp 学生信息管理系统设计与实现
- jsp与SQL Server数据库实现的客户注册登
- 简易教学管理系统(jsp spring struts h
- 学生信息管理系统 JSP MySQL
- jsp ajax 三级联动菜单
川公网安备 51152502000135号
评论
共有 条评论