Package com.knowgate.jdc

Examples of com.knowgate.jdc.JDCConnection.prepareStatement()


      oStmt.setString(3, getCategoryGuid());
    }
    else {
      if (DebugFile.trace) DebugFile.writeln("Connection.prepareStatement(SELECT " + DB.gu_mimemsg + "," + DB.id_message + "," + DB.pg_message + "," + DB.tx_subject + "," + DB.tx_email_from + "," + DB.tx_email_reply + "," + DB.nm_from + " FROM " + DB.k_mime_msgs + " WHERE " + DB.id_message + "='"+sMsgId+"' AND " + DB.gu_category + "='"+getCategoryGuid()+"' AND " + DB.bo_deleted + "<>1)");

      oStmt = oJdcn.prepareStatement("SELECT " + DB.gu_mimemsg + "," + DB.id_message + "," + DB.pg_message + "," +
                                                 DB.tx_subject + "," + DB.tx_email_from + "," + DB.tx_email_reply + "," +
                                                 DB.nm_from + " FROM " + DB.k_mime_msgs +
                                     " WHERE " + DB.id_message + "=? AND " + DB.gu_category + "=? AND " + DB.bo_deleted + "<>1",
                                     ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
      oStmt.setString(1, sMsgId);
View Full Code Here


                                   (sTextHtml==null ? sTextPlain : sTextHtml), null, null, null);

      if (aAttachments!=null) {
          Integer oPart = DBCommand.queryMaxInt(oCon, DB.id_part, DB.k_mime_parts, DB.gu_mimemsg+"='"+oMsg.getMessageGuid()+"'");
          if (oPart==null) oPart = new Integer(1);
          PreparedStatement oStm = oCon.prepareStatement("INSERT INTO " + DB.k_mime_parts + "("+DB.gu_mimemsg+","+DB.id_message+","+DB.id_part+","+DB.id_disposition+","+DB.id_content+","+DB.id_type+","+DB.len_part+","+DB.de_part+","+DB.file_name+") VALUES ('"+oMsg.getMessageGuid()+"',?,?,'reference',?,?,?,?,?)");
        for (int p=0; p<aAttachments.length; p++) {
              String sFilePath = Gadgets.chomp(sUserDir,File.separator)+aAttachments[p];
              File oAttach = new File(sFilePath);
              if (oAttach.exists()) {
                oStm.setString(1, sMsgId);
View Full Code Here

      DebugFile.writeln("Begin DBMimePart.getText()");
      DebugFile.incIdent();
      DebugFile.writeln("Connection.prepareStatement(SELECT "+DB.id_message+","+DBBind.Functions.ISNULL+"(len_part,0),id_encoding,by_content FROM "+ DB.k_mime_parts + " WHERE (" + DB.gu_mimemsg + "='"+sMsgGuid+"') AND id_part='"+String.valueOf(iPartId)+")");
    }

    PreparedStatement oStmt = oConn.prepareStatement("SELECT "+DB.id_message+","+DBBind.Functions.ISNULL+"(len_part,0),id_encoding,by_content FROM "+ DB.k_mime_parts + " WHERE (" + DB.gu_mimemsg + "=?) AND id_part=?",
                                                     ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);

    oStmt.setString(1, sMsgGuid);
    oStmt.setInt(2, iPartId);
View Full Code Here

                response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Parameter meeting is requiered");
          } else {
            try {
              oCon = oDbb.getConnection("HttpCalendarServlet.getmeeting",true);
          Meeting oMeet = new Meeting();
          PreparedStatement oStm = oCon.prepareStatement("SELECT "+DB.gu_meeting+" FROM "+DB.k_meetings+" WHERE "+DB.gu_workarea+"=? AND ("+DB.gu_meeting+"=? OR "+DB.id_icalendar+"=?)", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
          oStm.setString(1, sWrkA);
          oStm.setString(2, sMeet);
          oStm.setString(3, sMeet);
          ResultSet oRst = oStm.executeQuery();         
          if (oRst.next()) {
View Full Code Here

            try {
              oCon = oDbb.getConnection("HttpCalendarServlet.storemeeting",false);
          if (null!=aRooms) {
            boolean bExists;
            short iAvailable = 0;
            PreparedStatement oAct = oCon.prepareStatement("SELECT "+DB.bo_available+" FROM "+DB.k_rooms+" WHERE "+DB.gu_workarea+"=? AND "+DB.nm_room+"=?");
            for (int v=0; v<aRooms.length; v++) {
              oAct.setString (1,sWrkA);
              oAct.setString (2, aRooms[v]);
              ResultSet oRct = oAct.executeQuery();
              bExists = oRct.next();
View Full Code Here

            } // next
            oAct.close();
          } // fi
          oCon.setAutoCommit(false);
          Meeting oMeet = new Meeting();
          PreparedStatement oStm = oCon.prepareStatement("SELECT "+DB.gu_meeting+" FROM "+DB.k_meetings+" WHERE "+DB.gu_workarea+"=? AND ("+DB.gu_meeting+"=? OR "+DB.id_icalendar+"=?)", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
          oStm.setString(1, sWrkA);
          oStm.setString(2, sMeet);
          oStm.setString(3, sMeet);
          ResultSet oRst = oStm.executeQuery();         
          if (oRst.next()) {
View Full Code Here

            oMeet.store(oCon);
          }

          oMeet.clearRooms(oCon);
          if (aRooms!=null) {
            PreparedStatement oPrm = oCon.prepareStatement("INSERT INTO "+DB.k_x_meeting_room+" ("+DB.gu_meeting+","+DB.nm_room+","+DB.dt_start+","+DB.dt_end+") VALUES (?,?,?,?)");
            for (int a=0; a<aRooms.length; a++) {
              oPrm.setString(1, oMeet.getString(DB.gu_meeting));
              oPrm.setString(2, aRooms[a]);
              oPrm.setTimestamp(3, new Timestamp(oMeet.getDate(DB.dt_start).getTime()));
              oPrm.setTimestamp(4, new Timestamp(oMeet.getDate(DB.dt_end).getTime()));
View Full Code Here

          String sAttendants = request.getParameter("attendants");
          if (sAttendants!=null) {
            if (sAttendants.length()>0) {
              String sGuFellow;
              String[] aAttendants = Gadgets.split(sAttendants,',');
              PreparedStatement oAtd = oCon.prepareStatement("SELECT * FROM "+DB.k_fellows+" WHERE "+DB.gu_workarea+"=? AND ("+DB.gu_fellow+"=? OR "+DB.tx_email+"=?)");
              for (int a=0; a<aAttendants.length; a++) {
                oAtd.setString(1, oMeet.getString(DB.gu_workarea));
                oAtd.setString(2, aAttendants[a]);
                oAtd.setString(3, aAttendants[a]);
                ResultSet oRtd = oAtd.executeQuery();
View Full Code Here

          } else {
            try {
              oCon = oDbb.getConnection("HttpCalendarServlet.deletemeeting",false);
          oCon.setAutoCommit(false);
          Meeting oMeet = new Meeting();
          PreparedStatement oStm = oCon.prepareStatement("SELECT "+DB.gu_meeting+" FROM "+DB.k_meetings+" WHERE "+DB.gu_workarea+"=? AND ("+DB.gu_meeting+"=? OR "+DB.id_icalendar+"=?)", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
          oStm.setString(1, sWrkA);
          oStm.setString(2, sMeet);
          oStm.setString(3, sMeet);
          ResultSet oRst = oStm.executeQuery();         
          if (oRst.next()) {
View Full Code Here

        }
        sSQL += " ORDER BY "+DB.nu_elapsed;

        if (DebugFile.trace) DebugFile.writeln("Connection.prepareStatement("+sSQL+")");

        oStm = oCon.prepareStatement(sSQL,ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);

        oStm.setString (1,sWorkAreaId);
        oStm.setString (2,sUserId);
        oStm.setString (3,sWorkAreaId);
        oStm.setString (4,sUserId);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.