虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

sQlServerDriver

  • jsp 留言系统try { Class.forName("com.microsoft.jdbc.sqlserver.sQlServerDriver").newInstance()

    jsp 留言系统try { Class.forName("com.microsoft.jdbc.sqlserver.sQlServerDriver").newInstance() } catch (InstantiationException e) { // TODO Auto-generated catch block e.printStackTrace() } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace() } catch (ClassNotFoundException e) { // TODO Auto-generated catch block System.out.println("Driver not found") }

    标签: sQlServerDriver newInstance microsoft sqlserver

    上传时间: 2014-07-10

    上传用户:开怀常笑

  • 用jsp编写的网上测试系统。 (1)以“Windows身份验证模式”连接SQL Server数据库。 (2)需要安装SQL Server 的补丁SP3。 (3)运行的时候可以参照书上

    用jsp编写的网上测试系统。 (1)以“Windows身份验证模式”连接SQL Server数据库。 (2)需要安装SQL Server 的补丁SP3。 (3)运行的时候可以参照书上的说明进行,如出试卷的时候,若试卷标题重复,可以从数据库中删除,然后添加试卷。 (4)出试卷路径为 http://localhost:8080/chap22/chujuan.jsp 如果放在根目录,则路径和书上的界面一样。 (5)选择题路径为 http://localhost:8080/chap22/xuanzeti.jsp (6)判断题路径为 http://localhost:8080/chap22/panduanti.jsp (7)如果采用本应用中连接数据库的方法调试不通,可以参照20章中通过ODBC连接数据库的方法来修改 将以下代码: Class.forName("com.microsoft.jdbc.sqlserver.sQlServerDriver") String driver = "jdbc:microsoft:sqlserver://localhost:1433" Connection conn = DriverManager.getConnection(driver,"","") 修改成: Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") String driver = "jdbc:odbc:try" Connection conn = DriverManager.getConnection(driver,"sa","") //如果是windows验证,则不用用户名和密码

    标签: Server SQL Windows jsp

    上传时间: 2015-06-27

    上传用户:450976175