• 大小: 546KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-02
  • 语言: Java
  • 标签: jsp  留言板  JavaBean  

资源简介

基于SQL server2008 + tomcat7.0实现.导入eclipse直接运行,内附详细说明.

资源截图

代码片段和文件信息

package fozhyn.javaBean;
import java.sql.*;

public class DBConn {
private Connection conn = null;
private Statement stmt = null;
private String dbString = “com.microsoft.jdbc.sqlserver.SQLServerDriver“;
private String url = “jdbc:sqlserver://127.0.0.1:1433;DatabaseName=GuestBook“;
private String user = “fozhyn“; 
private String password = “52074787“; 
public DBConn()
{
try
{
        Class.forName(dbString);
    }
    catch(ClassNotFoundException e)
    {
System.out.println(e.getMessage());
}
}

public ResultSet executeQuery(String sql)
{
try
{
        conn = DriverManager.getConnection(urluserpassword);
        stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE ResultSet.CONCUR_READ_ONLY);
ResultSet rs=stmt.execute

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

     文件        834  2011-06-10 12:32  GuestBook\.classpath

     文件       1042  2011-06-10 12:32  GuestBook\.project

     文件        503  2011-06-10 12:32  GuestBook\.settings\.jsdtscope

     文件        104  2011-06-10 12:54  GuestBook\.settings\org.eclipse.core.resources.prefs

     文件        395  2011-06-10 12:32  GuestBook\.settings\org.eclipse.jdt.core.prefs

     文件        457  2011-06-10 12:32  GuestBook\.settings\org.eclipse.wst.common.component

     文件        345  2011-06-10 12:32  GuestBook\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2011-06-10 12:32  GuestBook\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2011-06-10 12:32  GuestBook\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       2567  2011-06-10 12:44  GuestBook\build\classes\fozhyn\javaBean\DBConn.class

     文件    1659392  2011-06-10 13:50  GuestBook\DB\GuestBook_backup

     文件     466359  2009-03-26 09:31  GuestBook\sqljdbc4.jar

     文件       2345  2011-06-10 12:44  GuestBook\src\fozhyn\javaBean\DBConn.java

     文件       2182  2011-06-10 13:40  GuestBook\WebContent\GuestBook.jsp

     文件       1002  2011-06-10 13:42  GuestBook\WebContent\GuestBook_add.jsp

     文件       1288  2011-06-10 13:43  GuestBook\WebContent\GuestBook_add_ok.jsp

     文件        857  2011-06-10 13:40  GuestBook\WebContent\GuestBook_del.jsp

     文件       1580  2011-06-10 13:45  GuestBook\WebContent\GuestBook_replay.jsp

     文件       1339  2011-06-10 13:40  GuestBook\WebContent\GuestBook_replay_ok.jsp

     文件       1434  2011-06-10 13:40  GuestBook\WebContent\GuestBook_update.jsp

     文件       1334  2011-06-10 13:40  GuestBook\WebContent\GuestBook_update_ok.jsp

     文件         47  2011-06-10 12:33  GuestBook\WebContent\index.jsp

     文件         39  2011-06-10 12:32  GuestBook\WebContent\meta-INF\MANIFEST.MF

     文件        290  2011-06-10 14:09  GuestBook\说明.txt

     目录          0  2011-06-10 13:51  GuestBook\build\classes\fozhyn\javaBean

     目录          0  2011-06-10 13:51  GuestBook\build\classes\fozhyn

     目录          0  2011-06-10 13:51  GuestBook\src\fozhyn\javaBean

     目录          0  2011-06-10 12:32  GuestBook\WebContent\WEB-INF\lib

     目录          0  2011-06-10 13:51  GuestBook\build\classes

     目录          0  2011-06-10 13:51  GuestBook\src\fozhyn

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

评论

共有 条评论