一聚教程网:一个值得你收藏的教程网站

热门教程

jsp留言板源代码4

时间:2022-07-02 18:13:52 编辑:袖梨 来源:一聚教程网

其中的opDb.java
============================================
package ymbean;
import java.sql.*;
import java.util.*;
import java.text.*;
import com.chinazjj.sql.dsql;
import com.chinazjj.util.dutil;
//其他的包dsql,dutil中的内容我就不再贴了,在本文件中用到的两个函数都很简

public class opDb {
private String inquire_value="",inquire_item="",disptype="",inqtyp
e="";
private String inquire_num="",inquire_addr="",inquire_name="";
private dutil ldutil=new dutil();
public opDb() {
}
public void setinquire_item(String name) { inquire_item= name
;}
public void setinquire_value( String name ) { inquire_value = ldut
il.chineseToUnicode(name);}
public void setdisptype(String name) { disptype=name;}
public void setinqtype(String name) { inqtype=name;}
public void setinquire_num( String name ) { inquire_num = ldutil.c
hineseToUnicode(name);}
public void setinquire_addr( String name ) { inquire_addr = ldutil
.chineseToUnicode(name);}
public void setinquire_name( String name ) { inquire_name = ldutil
.chineseToUnicode(name);}
public String getinquire_dndata()
{
return "";
}
public ResultSet executeQuery(String sql)
{
ResultSet rs = null;
Statement lstmt = null;
try {
lstmt = connectdb();
rs = lstmt.executeQuery(sql);
System.out.println("executeQuery: "+sql);
} catch(SQLException ex) { System.err.println("executeQuery: " +
ex.getMessage());}
return rs;
}
public Statement getStmt()
{
Statement lstmt = null;
lstmt = connectdb();
return lstmt;
}
public String executeUpdate(String sql)
{
ResultSet rs = null;
Statement lstmt = null;
try {
lstmt = connectdb();

热门栏目