;}
public void setinquire_value( String name ) { inquire_value = https://www.04ip.com/post/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();
lstmt.executeUpdate(sql);
System.out.println("executeUpdate: "+sql);
lstmt.executeUpdate("commit");
}
catch(SQLException ex) { System.err.println("executeQuery: " + e
x.getMessage());
return(ex.getMessage());
}
return("executeUpdate ok");
}
public Statement connectdb()
{
Statement lstmt=null;
Connection conn=null;
final String connect_string="jdbc:oracle:thin:scott/tiger@192.168.
0.1:1521:clubdb";
final String driver_string="oracle.jdbc.driver.OracleDriver";
dsql mysql=new dsql();
lstmt=mysql.dconnectdb(driver_string,connect_string);
return lstmt;
}
public Statement connectdb(String connect_string)
{
Statement lstmt=null;
Connection conn=null;
final String driver_string="oracle.jdbc.driver.OracleDriver";
dsql mysql=new dsql();
lstmt=mysql.dconnectdb(driver_string,connect_string);
return lstmt;
}
//=========other function ===================================
public String getCurrentDate(String ldateform)
{
return(new SimpleDateFormat(ldateform).format(new java.util.Date(
)));
}
//========"/n" to ";br;" =====================================
//去掉奇怪的:
public String removeComment(String Content){
String makeContent=new String();
StringTokenizer strToken=new StringTokenizer(Content,"\n");
String tempToken=null;
while(strToken.hasMoreTokens()){
tempToken=strToken.nextToken();
if(tempToken.indexOf(":")!=0)
makeContent=makeContent+tempToken+"\n";
}
return makeContent;
}
//将/n转换成为回车;br;
public String addBr(String Content){
String makeContent=new String();
StringTokenizer strToken=new StringTokenizer(Content,"\n");
while(strToken.hasMoreTokens()){
makeContent=makeContent+";br;"+strToken.nextToken();
}
return makeContent;
}
//将;br;转换成为回车/n
public String addCr(String Content){
String makeContent=new String();
StringTokenizer strToken=new StringTokenizer(Content,";br;");
while(strToken.hasMoreTokens()){
makeContent=makeContent+"\n"+strToken.nextToken();
}
return makeContent;
}
//====================================================================
=====
public boolean getIdentify(String name1,String pwd1)
{
try
{
String sql="select * from club_users where username='" + name1 + "'
and password='" + pwd1 + "'";
ResultSet rs = executeQuery(sql);
if(rs.next()) { rs.close(); return(true);}
推荐阅读
- Pdf怎么卖,卖pdf书
- loadrunner测试html5,loadrunner测试结果分析
- b站查看全部直播记录,b站如何看直播历史
- 编写java源代码可以用 java源代码怎么编译
- 为什么陌陌直播不了,陌陌为什么看不了直播了
- 计算机机房管理系统毕业设计,计算机机房管理系统数据库设计
- gis中怎么添加属性,arcgis如何添加属性表字段
- 最短java代码 最简单的java程序代码
- 快手不登陆怎么看视频号,快手不登陆怎么看视频号直播