| | |
| | | response.setContentType("text/html; charset=utf-8"); |
| | | response.setHeader("Access-Control-Allow-Origin","*"); |
| | | %> |
| | | <html> |
| | | <head> |
| | | </head> |
| | | <body> |
| | | <%@include file="mysql_connect.jsp"%> |
| | | <%@page import="java.util.LinkedHashMap"%> |
| | | <%@page import="java.util.HashMap"%> |
| | |
| | | String sltcSql =request.getParameter("sql"); |
| | | String anquanma=request.getParameter("anquanma"); |
| | | try{ |
| | | |
| | | Class.forName(driverClass);{ |
| | | Connection conAnquan=DriverManager.getConnection( urlglass,user,password); |
| | | |
| | | //通过connection数据库链接对象 创建一个statement对象数据库操作对象 |
| | | /* Connection conAnquan=DriverManager.getConnection( urlglass,user,password); |
| | | Statement stmts=conAnquan.createStatement(); |
| | | //执行sql语句 |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SSS"); |
| | | Date time = new Date(); |
| | | long timestamp = time.getTime() / 1000L; |
| | |
| | | { |
| | | coun++; |
| | | } |
| | | conAnquan.close(); |
| | | rss.close(); |
| | | stmts.close(); |
| | | conAnquan.close(); */ |
| | | //coun>0 |
| | | if(true){ |
| | | Connection con=DriverManager.getConnection( url,user,password); |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | cs.close(); |
| | | }else{ |
| | | Statement stmtss=con.createStatement(); |
| | | |
| | | stmtss.execute(sltcSql); |
| | | stmtss.close(); |
| | | } |
| | | |
| | | |
| | | con.close(); |
| | | }else{ |
| | | out.print("[[anquanmaerr]]"); |
| | | } |
| | | } |
| | | } |
| | | }catch(Exception e){ |
| | | Class.forName(driverClass);{ |
| | | Connection con=DriverManager.getConnection(url,user,password); |
| | | CallableStatement bs =con.prepareCall("{call AXJ_err(?,?,?)}"); |
| | | bs.setString(1, e.toString()); |
| | | bs.setString(2, gongneng); |
| | | bs.setString(3, sltcSql+','+anquanma); |
| | | bs.setString(3, sltcSql); |
| | | bs.execute(); |
| | | bs.close(); |
| | | con.close(); |
| | | } |
| | | out.print("[['发生未知错误,请联系相关人员']]"); |
| | | out.print("[['发生未知错误,请联系相关人员']]"); |
| | | } |
| | | %> |
| | | </body> |
| | | </html> |
| | | %> |