1 package smile.stored; 2 3 import java.util.*; 4 import java.sql.*; 5 6 14 public class s_updateArticleDisableSection extends StoredProcedure implements ProcedureInterface { 15 16 String in_itemID; 17 18 String in_disableIndex; 19 20 String in_disableArticle; 21 22 String in_verNum; 23 24 27 public s_updateArticleDisableSection() { 28 } 29 30 38 public void init(HashMap initData, Connection con) { 39 super.init(initData, con); 41 in_itemID = utils.getString(data, "ITEMID", ""); 43 in_disableIndex = utils.getString(data, "DISABLEINDEX", ""); 44 in_disableArticle = utils.getString(data, "DISABLEARTICLE", ""); 45 } 46 47 53 public void checkParams() throws SQLException { 54 } 55 56 62 public void checkAction() throws SQLException { 63 if (in_itemID.equals("")) 64 throw new SQLException("s_updateArticleDisableSection: ERROR: required field ITEMID was not sent."); 65 if (in_disableIndex.equals("")) 66 throw new SQLException("s_updateArticleDisableSection: ERROR: required field DISABLEINDEX was not sent."); 67 if (in_disableArticle.equals("")) 68 throw new SQLException("s_updateArticleDisableSection: ERROR: required field DISABLEARTICLE was not sent."); 69 } 70 71 77 public void executeAction() throws SQLException { 78 79 StringBuffer v_sb = new StringBuffer (); 80 v_sb.append("UPDATE tblarticles ").append(" SET disableArticle = '" + in_disableArticle + "', ").append(" disableIndex = '" + in_disableIndex + "' ") 81 .append(" WHERE itemID = '" + in_itemID + "' "); 82 83 execStatement(v_sb.toString()); 84 85 execStatementToRS(queryResultOk); 86 } 87 88 } 89 | Popular Tags |