rt.网上的jsp免费空间,怎么连接数据库的?毕竟不可能有对服务器的操作权限
也就是说不能有建表之类的操作。可行吗?

解决方案 »

  1.   

    一般收费的他们提供服务器的操作权限,你免费的有可能是提供Access数据库。
      

  2.   

    jsp+数据库 好像必须联系空间服务商才能安装论坛之类的。。 
      

  3.   

    连接ACCESS数据库
    //access driver
    private StringBuffer accessURL=new StringBuffer("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=");
    private String accessFilePath="";
    private String accessFileName="";
    //Method:connect to access file
    public Connection getConnectionToAccess(String fileURL) throws SQLException,ClassNotFoundException
    {
      accessURL.append(fileURL);
      Class.forName(driver);
      conn=DriverManager.getConnection(accessURL.toString());
      return conn;
    }<jsp:useBean id="DBConnection" scope="page" class="com.huading.DBConnection"/>
      Connection conn=DBConnection.getConnectionToAccess(application.getRealPath("/news/date/news.mdb"));
      Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); 写了这段代码后还需要建立dsn源吗??