operatedb.java
来自「用最近的dojo1.2.1制作前端的ajax购书网站」· Java 代码 · 共 81 行
JAVA
81 行
package server.consumer;
import server.database.*;
import java.sql.*;
import java.util.*;
/**
* @author user
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
public class operateDb {
Operation op=new Operation();
ResultSet rs;
consumerData CD=new consumerData();
public void validate(String name,String password)
{
//op.select(sql)
}
public boolean insertInfo(String str)
{
int column=0;
try{
column=op.IDU(str);
}
catch(ClassNotFoundException e){}
catch(SQLException e){}
catch(InstantiationException e){}
catch(IllegalAccessException e){}
if(column==1)
return true;
else
return false;
}
/**
* Returns the rs.
* @return ResultSet
*/
public ResultSet getRs(String sql)
{
try
{
rs=op.select(sql);
rs.next();
}
catch(ClassNotFoundException e){}
catch(SQLException e){}
catch(InstantiationException e){}
catch(IllegalAccessException e){}
return rs;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?