请教一个 关于数据源链接的 问题!?
package fundpack;
import java.sql.*;
public class CONTROLDB{
String url= "jdbc:odbc:fundconn ";
Connection conn=null;
Statement stmt=null;
public CONTROLDB() {
try{
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver ");
conn=DriverManager.getConnection(url);
}catch(Exception e){
System.out.println(e.getMessage());
}
}
public ResultSet executeQuery(String sql){
ResultSet rs=null;
try{
Statement stmt = conn.createStatement
(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
rs = stmt.executeQuery(sql);
}catch(Exception e){e.printStackTrace();
System.out.println(e.getMessage());
}
return rs;
}
public void executeUpdate(String sql){
try{
Statement stmt=conn.createStatement
(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
stmt.executeUpdate(sql);
}catch(Exception e){
System.out.println(e.getMessage());
}
}
public void close() throws Exception{
if (stmt != null) {
stmt.close();
stmt = null;
}
if(conn != null){
conn.close();
conn = null;
}
}
}
这是我的数据库连接文件CONTROLDB.java,数据源为fundconn,我该如何在jbuilder里面用代码在access数据库里面
创建新的表格阿?比如
<%@ page contentType= "text/html; charset=GB2312 " %>
<%@ page import= "fundpack.*,java.sql.* "%>
<%@ page import= "javax.servlet.* " %>
<HTML>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<meta name= "GENERATOR " content= "Microsoft FrontPage 4.0 ">
<meta name= "ProgId " content= "FrontPage.Editor.Document ">
<body>
<%
String sql= "create table 20072 (idno char(50), name char(50), origin char(50), origin char(50), sex