???????????
???????????? ???????[ 2014/7/1 11:22:45 ] ?????????????
??????????????濴????????????????????????????????????????????????????????????SQL INSERT/UPDATE/DELETE/SELECT ?????????
???????????£?
/**
*
*/
package com.sotaof.struts.db.utils;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
import javax.naming.InitialContext;
import javax.sql.DataSource;
/**
* @Title: DbUtils.java
* @Package com.sotaof.struts.db.utils
* @Description: TODO
* @author A18ccms A18ccms_gmail_com
* @date 2013-2-4 ????06:30:36
* @version V1.0
*/
public class DbUtils {
private static Logger logger = Logger.getLogger("DbUtils");
public static int execute(String sql?? List<Object> paramList) throws Exception
{
if(sql == null || sql.trim().equals(""))
{
logger.info("parameter is valid!");
}
Connection conn = null;
PreparedStatement pstmt = null;
int result = 0;
try
{
conn = DbUtils.getConnection();
pstmt = DbUtils.getPreparedStatement(conn?? sql);
setPreparedStatementParam(pstmt?? paramList);
if(pstmt == null)
{
return -1;
}
result = pstmt.executeUpdate();
}
catch(Exception e)
{
logger.info(e.getMessage());
throw new Exception(e);
}
finally
{
closeStatement(pstmt);
closeConn(conn);
}
return result;
}
|
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
?????????????????????????Щ????????????????????TC???????????????Щ???????????????????????????????????????????????(java .net ?????)???mysql???????????????????ж????д???Python???????????????(DB2)??????BufferPool????????????????????????????????6??????????????????滮???????????????-????????SQL Server???????????????????λ?????PHP??SQL????????????????????Pythonд???NoSQL????????? SQL ?е????????????? SQL ?е?????????Java???????:?????MySQL???????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????