针对性营销10000系统_数据库连接_更新__源码

 
  1. <html>
  2.     <head>
  3.         <title>
  4.             保存脚本
  5.         </title>
  6.         
  7.     <style type="text/css">
  8. body{
  9.   margin:0px;
  10.   background-image:url(images/login_02.jpg);
  11.   background-repeat:repeat-x;
  12.   font:14px Tahoma;
  13.   color:#023951;
  14.  }
  15. input{
  16.   width:122px;
  17.   height:20px;
  18.   border:1px solid #023951;
  19.   color:#035C83;
  20.   line-height:20px;
  21. }
  22. </style>
  23.     </head> 
  24. <%@ page  language="java" contentType="text/html; charset=gb2312"
  25. import = "java.sql.*,com.codestudio.util.*" %>
  26. <body>
  27.     <table width="100%" border="0" cellspacing="0" cellpadding="0">
  28.   <tr>
  29.   <td background="images/bg.jpg"  width="353"><img src="images/default/banner.jpg" width="353" height="40" /></td>
  30.   </tr>
  31. </table>
  32. <table border="1" width="400">
  33.     
  34. <%  String tare = request.getParameter( "textfield3" );
  35.    String tare2 = request.getParameter( "textfield2" );
  36.    SQLManager myMan = SQLManager.getInstance();
  37.      Connection myConn= myMan.requestConnection();
  38.      Statement stmt   = myConn.createStatement();
  39.      
  40.      
  41.     stmt.executeUpdate("update sale_plan set Sale_Script='" +tare + "' where Sale_Plan_Id ="+tare2);
  42.      
  43.     
  44.  ResultSet myResultSet= stmt.executeQuery("select * from SALE_PLAN where Sale_Plan_Id ="+tare2);
  45.      if (myResultSet != null)
  46.      {
  47.         while (myResultSet.next())
  48.         {
  49.            String cust_id=myResultSet.getString("Sale_Plan_Id");
  50.            String plan_id=myResultSet.getString("Sale_Plan_Name");
  51.            String state  =myResultSet.getString("Sale_Script");
  52. %>              
  53.         <tr>
  54.                <td><%=cust_id  %></td>
  55.                <td><%=plan_id  %></td>
  56.                <td><%=state    %></td>
  57.         </tr>            
  58.                  
  59. <%               
  60.         }
  61.      }
  62.      stmt.close();
  63.      myMan.returnConnection(myConn);
  64. %>
  65. <h1>保存成功</h1>
  66. </table>
  67.      
  68.    
  69. </body>
  70. </html>

猜你喜欢

转载自blog.csdn.net/lijieneptune/article/details/2889188
今日推荐