当前位置: 技术问答>java相关
高分求解了了了了,救命呀!!!!!!!!
来源: 互联网 发布时间:2015-03-24
本文导语: 在jrun(jsp server)中,我设置了一个(jdbc for sql srever )test 是这样的 Driver* allaire.jrun.jdbc.JRunDriver URL* jdbc:jrun:sqlserver://127.0.0.1:1433;databaseName=work 请教 我在 jsp中该如何调用该 jdb...
在jrun(jsp server)中,我设置了一个(jdbc for sql srever )test
是这样的
Driver* allaire.jrun.jdbc.JRunDriver
URL* jdbc:jrun:sqlserver://127.0.0.1:1433;databaseName=work
请教 我在 jsp中该如何调用该 jdbc
还有其他的有一个参数
Vendor Arguments pooling=true
这是什么意思啊?
帮我解决后还会加分的!!!
谢谢了,各位高手!!
是这样的
Driver* allaire.jrun.jdbc.JRunDriver
URL* jdbc:jrun:sqlserver://127.0.0.1:1433;databaseName=work
请教 我在 jsp中该如何调用该 jdbc
还有其他的有一个参数
Vendor Arguments pooling=true
这是什么意思啊?
帮我解决后还会加分的!!!
谢谢了,各位高手!!
|
一个具体的实例:
import java.sql.*;
import java.io.*;
public class BaseBean {
protected String dbURL;
protected String dbDriver;
protected String userName;
protected String passwd;
protected String tableName;
protected Connection dbCon;
protected String codeTableName;
protected PreparedStatement preStatement;
public BaseBean() {
super();
}
public boolean connect() throws ClassNotFoundException, SQLException {
Class.forName(dbDriver);
dbCon = DriverManager.getConnection(this.getDbURL(),userName,passwd);
return true;
}
public boolean isConnect() {
if (dbCon!=null) {return true;}
else {return false;}
}
public void close() throws SQLException {
dbCon.close();
}
public ResultSet execSQL(String sql) throws SQLException {
Statement st = dbCon.createStatement();
return st.executeQuery(sql);
}
public void preparedUpdateSQL(String sql) throws SQLException {
preStatement=dbCon.prepareStatement(sql);
}
public int execUpdateSQL(String sql) throws SQLException {
if (sql==null) return -1;
Statement st=dbCon.createStatement();
return st.executeUpdate(sql);
}
public String getDbDriver() {
return this.dbDriver;
}
public void setDbDriver(String newValue) {
this.dbDriver = newValue;
}
public String getDbURL() {
return this.dbURL;
}
public void setDbURL(/tech-qa-java/String newValue/index.html) {
this.dbURL = newValue;
}
public void setPasswd(String passwd) {
this.passwd=passwd;
}
public void setUserName(String userName) {
this.userName=userName;
}
public String getUserName() {
return userName;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName=tableName;
}
public String getCodeTableName() {
return codeTableName;
}
public void setCodeTableName(String codeTableName) {
this.codeTableName=codeTableName;
}
}
jsp:
日期的格式可以使用简写,即可以只输入年,年和月
:
等于大于小于
:
:
英语
日语
其它
:
:
:
:
:
'"+request.getParameter("bir_date")+"' ");
}
else if (request.getParameter("birthdate_option").equals("lst")) {
options.add("bir_date'"+request.getParameter("in_date")+"' ");
}
else if (request.getParameter("comedate_option").equals("lst")) {
options.add("in_date
import java.sql.*;
import java.io.*;
public class BaseBean {
protected String dbURL;
protected String dbDriver;
protected String userName;
protected String passwd;
protected String tableName;
protected Connection dbCon;
protected String codeTableName;
protected PreparedStatement preStatement;
public BaseBean() {
super();
}
public boolean connect() throws ClassNotFoundException, SQLException {
Class.forName(dbDriver);
dbCon = DriverManager.getConnection(this.getDbURL(),userName,passwd);
return true;
}
public boolean isConnect() {
if (dbCon!=null) {return true;}
else {return false;}
}
public void close() throws SQLException {
dbCon.close();
}
public ResultSet execSQL(String sql) throws SQLException {
Statement st = dbCon.createStatement();
return st.executeQuery(sql);
}
public void preparedUpdateSQL(String sql) throws SQLException {
preStatement=dbCon.prepareStatement(sql);
}
public int execUpdateSQL(String sql) throws SQLException {
if (sql==null) return -1;
Statement st=dbCon.createStatement();
return st.executeUpdate(sql);
}
public String getDbDriver() {
return this.dbDriver;
}
public void setDbDriver(String newValue) {
this.dbDriver = newValue;
}
public String getDbURL() {
return this.dbURL;
}
public void setDbURL(/tech-qa-java/String newValue/index.html) {
this.dbURL = newValue;
}
public void setPasswd(String passwd) {
this.passwd=passwd;
}
public void setUserName(String userName) {
this.userName=userName;
}
public String getUserName() {
return userName;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName=tableName;
}
public String getCodeTableName() {
return codeTableName;
}
public void setCodeTableName(String codeTableName) {
this.codeTableName=codeTableName;
}
}
jsp:
日期的格式可以使用简写,即可以只输入年,年和月
:
等于大于小于
:
:
英语
日语
其它
:
:
:
:
:
'"+request.getParameter("bir_date")+"' ");
}
else if (request.getParameter("birthdate_option").equals("lst")) {
options.add("bir_date'"+request.getParameter("in_date")+"' ");
}
else if (request.getParameter("comedate_option").equals("lst")) {
options.add("in_date