How do I retrieve multiple fields from SQL?

I am trying to retrieve multiple fields from a SQL table such as customer name, address and phone number by entering the customer # in my form either in a text field or a data drop down list.  I can get the drop downlist to populate from the table, however the other fields do not coorespond to my selection.  It appears that they are from the first record in the table regardless of which customer # I select from the drop down list.  Any assistance would be greatly appreciated.

Hi Carol.
Tried to follow Marks link but didn’t work.
Try this one.
http://blogs.adobe.com/formbuilder/2006/09/selecting_specific_database_records.html
At the moment I am about to start on this process with my form, so if you have any tips , please pass them on.
Raffe.

Similar Messages

  • How do I retrieve multiple files from my trashcan?

    I removed everything from my "finder" to my trashcan; I found that I had multiple duplicates in images, and I thought that was an easy way to get rid of them. But then my iPhoto started acting weird and when I contacted support, was told that I had to "put back" each file. There are roughly 17,000 images. I am overwhelmed to say the least. Suggestions? I tried highlighting several at a time, but that doesn't work.

    Yes, but it puts the files into a .zip file that is "corrupted, encrypted, empty or in an incompatible format".
     Debbie
    Don't tell God how big your storm is.  Tell the storm how big your God is!
          From: Pat Willener <[email protected]>
    To: Debbie Fisher <[email protected]>
    Sent: Wednesday, October 8, 2014 12:56 AM
    Subject:  how do i move multiple files from acrobat.com to my pc?
    how do i move multiple files from acrobat.com to my pc?
    created by Pat Willener in Adobe acrobat.com services - View the full discussionActually, if you go to https://cloud.acrobat.com/files you can check the checkboxes on the left of your files list, then click on the Download button to download multiple files. https://forums.adobe.com/servlet/JiveServlet/downloadImage/2-6802984-681636/900-380/acroba t.com.png  Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6802984#6802984 Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:  To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.  Start a new discussion in Adobe acrobat.com services by email or at Adobe Community For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • How to add a new field from SQL to report

    Post Author: Auburn
    CA Forum: .NET
    The field I am wanting to add to my report is not an actual field in SQL.  The field is actually a calculation done in the Select statement like this:  SELECT (SUM(CASE KILSHEET.Contract WHEN 1 THEN ((TOT_CARC_WEIGHT / 100) * 1.75) ELSE 0 END)) AS LSS here is the actual full SELECT: SELECT Sum(KILSHEET.PAY) As Pay, Sum(KILSHEET.Dead_Pay) As Dead_Pay, Sum(KILSHEET.GRADE_PREM) As Grade_Prem, Sum(KILSHEET.SORT_ADJ) As Sort_Adj, Sum(KILSHEET.SLOWS_PAY) As Slows_Pay, Sum(KILSHEET.RESALES_PAY) As Resales_Pay, Sum(KILSHEET.PLANT_CHARGE) As Plant_Charge, Sum(KILSHEET.OTHER_PREM) As Other_Prem, Sum(KILSHEET.NPB) As NPB, Sum(KILSHEET.SLOW_NPB) AS Slow_NPB, Sum(KILSHEET.RESALE_NPB) AS RESALE_NPB, Sum(KILSHEET.NPPC) AS NPPC, Sum(KILSHEET.SLOW_NPPC) AS SLOW_NPPC, Sum(KILSHEET.RESALE_NPPC) AS RESALE_NPPC, Sum(KILSHEET.NUMB_HEAD) AS NUMB_HEAD, Sum(KILSHEET.WEIGHT_FEE) AS WEIGHT_FEE, Sum(KILSHEET.SLOW_WEIGHT_FEE) AS SLOW_WEIGHT_FEE, Sum(KILSHEET.RESALE_WEIGHT_FEE) AS RESALE_WEIGHT_FEE, Sum(KILSHEET.WEIGHT) AS WEIGHT, Avg(KILSHEET.PER_LEAN)AS PER_LEAN, AVG(KILSHEET.ACTUAL_YIELD_PER) AS ACTUAL_YIELD_PER, AVG(KILSHEET.AVG_BACKFAT) AS AVG_BACKFAT, Sum(KILSHEET.TOT_CARC_WEIGHT) AS TOT_CARC_WEIGHT, Sum(KILSHEET.DIY) AS DIY, Sum(KILSHEET.DEAD) AS DEAD, Sum(KILSHEET.SLOWS) AS SLOWS, Sum(KILSHEET.RESALES) AS RESALES, Sum(KILSHEET.CONDEMNED) AS CONDEMNED, Sum(KILSHEET.DEAD_WEIGHT) AS DEAD_WEIGHT, Sum(KILSHEET.CONDEMNED_WEIGHT) AS CONDEMNED_WEIGHT, Sum(KILSHEET.SLOWS_WEIGHT) AS SLOWS_WEIGHT, Sum(KILSHEET.RESALES_WEIGHT) AS RESALES_WEIGHT, SUM((Kilsheet.TOT_Carc_WEIGHT / 100) * MarketPrice.mkprice) As TotalPrice,(SUM(CASE KILSHEET.Contract WHEN 1 THEN ((TOT_CARC_WEIGHT / 100) * 1.75) ELSE 0 END)) AS LSS FROM KILSHEET LEFT OUTER JOIN marketprice ON KILSHEET.Contract = marketprice.contract AND DATEPART(week, KILSHEET.KILLDATE) = marketprice.mkweek AND DATEPART(year, KILSHEET.KILLDATE) = marketprice.mkyear " & condStr + " " + locStr The problem with this is that my report is a Summary report.  It has to summarize multiple fields and the LSS calculation only needs to be calculated for certain records, hence the CASE.  Is there a way to add the LSS field to the report without it being physically part of the database? I am really struggling with this and any help would be greatly appreciated.  I hope I described this ok.

    Post Author: blairwheadon
    CA Forum: .NET
    This is what SQL Expressions are for.  I suggest you try using those (visible in the Field Explorer) to capture custom SQL field logic.
    Alterantively you could use a SQL command with your hand-written SQL.
    Thanks, Blair

  • How do I move multiple fields from the end of the document to another section?

    For some reason when I click Cntrl+V, it pastes the multiple fields at the end of my form rather than at the point of paste within the document.

    Select all of the fields that you wish to copy then use Ctrl-C.  Scroll to the part of the form where you want to paste the copied fields.  Select the field that you want the paste to occur after (ie, the pasted fields will appear after/below the selected field) and use Ctrl-V.
    Jeff Canepa
    Software Quality Engineer
    Adobe Systems, Inc.
    [email protected]

  • How to retrieve multiple data from table and represent it in jsp page

    Hi
    The below JavaScript code is used to add row in the table when I want to add multiple row data into table for single entry no field.
      <html>  function addRow()
                i++;
                var newRow = document.all("tblGrid").insertRow();
                var oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='srno"+i+"' type='text' id='srno"+i+"' size=10>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='itmcd"+i+"' type='text' id='itmcd"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='itmnm"+i+"' type='text' id='itmnm"+i+"' size='15'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='indentqty"+i+"' type='text' id='indentqty"+i+"' size='10'>";
                oCell = newRow.insertCell();
                    oCell.innerHTML = "<input name='uom"+i+"' type='text' id='uom"+i+"' size='10'><input type='hidden' name='mcode"+i+"'id='mcode"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='packqty"+i+"' type='text' id='packqty"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='packuom"+i+"' type='text' id='packuom"+i+"' size='10'><input type='hidden' name='pack"+i+"' id='pack"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='rate"+i+"' type='text' id='rate"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='dor"+i+"' type='text' id='dor"+i+"' size='0' onClick='"+putdate(this.name)+"'>";           
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='bccode"+i+"' type='text' id='bccode"+i+"' size='10'></td><input type='hidden' name='bcc"+i+"' id='bcc"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='cccode"+i+"' type='text' id='cccode"+i+"' size='10'></td><input type='hidden' name='ccc"+i+"' id='ccc"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='remark2"+i+"' type='text' id='remark2"+i+"' size='20'>";           
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input type='button' value='Delete' onclick='removeRow(this);' />";
               // oCell = newRow.insertCell();
               // oCell.innerHTML = "<input type='button' value='Clear' onclick='clearRow(this);' />";
            }<html>  Then this data are send to the next Servlet for adding into two table.
    My header portion data are added into one table which added only one row in table. while footer section data are added into the no of rows in another table dependent on No. of
    Rows added into jsp page.
    Here is an code for that logic.
    <html>
    ArrayList<String> mucode = new ArrayList<String>();
                                ArrayList<Integer> serials = new ArrayList<Integer>();
                                ArrayList<Integer> apxrate = new ArrayList<Integer>();
                                ArrayList<Integer> srname = new ArrayList<Integer>();
                                ArrayList<String> itcode = new ArrayList<String>();
                                ArrayList<String> itname = new ArrayList<String>();
                                ArrayList<Integer> iqnty = new ArrayList<Integer>();
                                ArrayList<String> iuom = new ArrayList<String>();
                                ArrayList<Integer> pqnty = new ArrayList<Integer>();
                                ArrayList<String> puom1 = new ArrayList<String>();
                               ArrayList<Integer> arate = new ArrayList<Integer>();
                                ArrayList<String> rdate = new ArrayList<String>();
                                ArrayList<String> bcs = new ArrayList<String>();
                                ArrayList<String> ccs = new ArrayList<String>();
                                ArrayList<String> remarkss = new ArrayList<String>();
                                //ArrayList<Integer> qtyrecs = new ArrayList<Integer>();
                                //ArrayList<String> dors = new ArrayList<String>();
                                //ArrayList<String> remarks = new ArrayList<String>();
                     String entryn = request.getParameter("entryno");       
                        String rows = request.getParameter("rows");
                        out.println(rows);  
                        //String Entryno = request.getParameter("entryno");
                       // out.println(Entryno);
                      int entryno = 0,reqqty = 0,srno = 0,deprequest = 0,rowcount = 0;
                                if(!Entryno.equals("")){
                                        entryno = Integer.valueOf(Entryno);
                                if(!rows.equals("")){
                                        rowcount = Integer.valueOf(rows);
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("srno"+i)!=null){
                                                serials.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
                                                out.println(serials.size());
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("srno"+i)!=null){
                                                srname.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
                                out.println(srname.get(0));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("itmcd"+i)!=null){
                                                itcode.add(request.getParameter("itmcd"+i).trim());
                                        } //out.println(itcode.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("itmnm"+i)!=null){
                                                itname.add(request.getParameter("itmnm"+i).trim());
                                        }//out.println(itname.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("indentqty"+i)!=null){
                                                iqnty.add(Integer.valueOf(request.getParameter("indentqty"+i).trim()));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("uom"+i)!=null){
                                                iuom.add(request.getParameter("uom"+i).trim());
                                        }//out.println(iuom.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("mcode"+i)!=null){
                                                mucode.add(request.getParameter("mcode"+i).trim());
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("packqty"+i).equals("")){
                                          pqnty.add(0);
                                        }else
                                            pqnty.add(Integer.valueOf(request.getParameter("packqty"+i).trim()));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("pack"+i)!=null){
                                                puom1.add(request.getParameter("pack"+i).trim());
                                       }else
                                        puom1.add("");
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("rate"+i).equals("")){                                     
                                            arate.add(0);
                                        }else
                                        arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));   
                     /* for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("rate"+i)!=null){
                                                arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));
                              for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("dor"+i)!=null){
                                                try{
                                                        rdate.add(dashdate.format(slashdate.parse(request.getParameter("dor"+i).trim())));
                                                }catch(ParseException p){p.printStackTrace();}
                                        }else
                                           { rdate.add("");}
                                   for(int i=1;i<=rowcount;i++){
                                 if(request.getParameter("bcc"+i)!=null){
                                                bcs.add(request.getParameter("bcc"+i).trim());
                                        }out.println(bcs.get(0));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("ccc"+i)!=null){
                                                ccs.add(request.getParameter("ccc"+i).trim());
                                        }out.println(ccs.get(0));
                                for(int i=1;i<=rowcount;i++){
                                    out.println("remark2");
                                        if(request.getParameter("remark2"+i)!=null){
                                                remarkss.add(request.getParameter("remark2"+i).trim());
                                        }out.println(remarkss.get(0));
                        ArrayList<String> Idate = new ArrayList<String>();
                        for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("dateindent"+i)!=null){
                                                try{
                                                        Idate.add(dashdate.format(dashdate.parse(request.getParameter("dateindent"+i).trim())));
                                                }catch(ParseException p){p.printStackTrace();}
                    String Rdate = dashdate.format(new java.util.Date());
                     String tdate = dashdate.format(new java.util.Date());    
                     // String Indentdate = dashdate.format(new java.util.Date());
                   //  String ApprovedT1 = dashdate.format(new java.util.Date());
                   //  String ApprovedT2 = dashdate.format(new java.util.Date());
                       // String ApprovedT1=" ";
                        //String ApprovedT2="";*/
                    String ApprovedT1= dashdate.format(new java.util.Date());
                   out.println (ApprovedT1);
                      String ApprovedT2=dashdate.format(new java.util.Date());
                       out.println(ApprovedT2);
                    String Indentdate=(dashdate.format(slashdate.parse(request.getParameter("dateindent").trim())));
                       out.println(Indentdate);
                        String Cocode ="BML001";  
                        out.println(Cocode);
                        String Deptcode = request.getParameter("dept1");
                        out.println(Deptcode);
                        String Empcode = request.getParameter("emp");
                        out.println(Empcode);
                        String Refno =request.getParameter("rtype"); 
                         out.println(Refno);
                        String Divcode = request.getParameter("todiv1");
                        out.println(Divcode);
                        String Usercode = "CIRIUS";    
                         String Whcode = request.getParameter("stor");
                        out.println(Whcode);
                        // String Itemgroupcode = request.getParameter("");
                         String Itemgroupcode ="120000";
                         out.println(Itemgroupcode);
                        String Supplytypecode = request.getParameter("stype");
                        out.println(Supplytypecode);
                        String Delcode = request.getParameter("deliverycode");
                        out.println(Delcode);
                        String Itemclass="WS";
                        out.println(Itemclass);
                        // String Itemclass = request.getParameter("iclass");
                       // out.println(Itemclass);
                        String unitcode = request.getParameter("uni");
                        out.println(unitcode);
                         String Todivcode = request.getParameter("todiv1");
                        out.println(Todivcode);
                        String Appxrate = request.getParameter("rate");
                        out.println(Appxrate);
                        String Srno = request.getParameter("srno");
                        out.println(Srno);                
                    /*    String Indqty = request.getParameter("indentqty");
                      out.println(Indqty);*/
                  String Itemcode = request.getParameter("itmcd");
                       out.println(Itemcode);
                       String Othersp = request.getParameter("remark1");
                        out.println(Othersp);
                        String Reqdt = request.getParameter("dor");
                        out.println(Reqdt);
                        String Munitcode = request.getParameter("mcode");
                        out.println(Munitcode);
                        String Packqty = request.getParameter("packqty");
                        out.println(Packqty);               
                        String Packuom = request.getParameter("pack");
                        out.println(Packuom);
                        String Remark2 = request.getParameter("remark2");
                        out.println(Remark2);
                        String BC = request.getParameter("bcc");
                        out.println(BC);
                        String CC = request.getParameter("ccc");
                        out.println(CC);
                        try{
                            st=connection.createStatement();
                            connection.setAutoCommit(false);
                            String sql="INSERT INTO PTXNINDHDR(COCODE,DEPTCODE,EMPCODE,APPROVEDT1,APPROVEDT2,INDDT,ENTRYNO,REFNO,REMARKS,DIVCODE,USERCODE,WHCODE,ITEMGROUPCODE,SUPTYPECODE,DELCODE,UNITCODE,TODIVCODE,ITEMCLASS)VALUES('"+Cocode+"','"+Deptcode+"','"+Empcode+"','"+ApprovedT1+"','"+ApprovedT2+"','"+Indentdate+"',"+Entryno+",'"+Refno+"','"+Othersp+"','"+Divcode+"','"+Usercode+"','"+Whcode+"','"+Itemgroupcode+"','"+Supplytypecode+"','"+Delcode+"','"+unitcode+"','"+Todivcode+"','"+Itemclass+"')";
                            out.println(sql);
                            st.addBatch(sql);
                            for(int i=0;i<serials.size();i++){
                                out.println("Inside the Statement");
                                String query3="test query for u";
                                out.println(query3);
                               String queryx="Insert into PTXNINDDTL(APXRATE,ENTRYNO,BRKNO,INDQTY,ITEMCODE,OTHERSPFCS,MUNITCODE,PACKQTY,PACKUOM,REMARKS,DIMSUBGRPCODE,DIMCODE,REQDT)VALUES("+arate.get(i)+","+entryno+","+srname.get(i)+","+iqnty.get(i)+","+itcode.get(i)+",'"+Othersp+"','"+mucode.get(i)+"',"+pqnty.get(i)+",'"+puom1.get(i)+"','"+remarkss.get(i)+"','"+bcs.get(i)+"','"+ccs.get(i)+"','"+rdate.get(i)+"')";
                               out.println(queryx);
                                st.addBatch(queryx);
                           int[] result=st.executeBatch();
                           connection.commit();
                           for(int k=0;k<result.length;k++)
                           out.println("rows updated by "+(k+1)+"insert sta:"+result[k]+"");
                        catch(BatchUpdateException bue)
                        out.println("error1;"+bue+"");
                        catch(SQLException sql)
                        out.println("error2;"+sql+"");
                        catch(Exception l)
                        out.println("error3;"+l+"");
    </html>
       Now I looking for to retrieve this footer section data available in multiple rows from footer table and present it in jsp page .
    I am finding difficulties in how to show this multiple row data for dynamic no of rows .i.e. variable no. of rows.
    I have able to show the data in Header portions of page in this ways
    here i am adding the part of code which shows the data from header part of table i.e from Header table
      <html>
    <h2 align="center"><b>Indent Preparation</b></h2>
        <div align="left">
            <table width="849" border="0" cellspacing="3" cellpadding="3" align="center">
                <tr>
                    <td ><div align="left"><b>Indent No.</b></div></td>
                    <td ><label>
                            <input name="indentno" type="text" id="indentno" size="15" value="" /><input type="hidden" name="no" id="no">
                    </label></td>
                    <td ><div align="center"><strong>Indent Date</strong></div></td>
                    <td ><label>
                            <div align="center">
                                <input name="dateindent" type="text" id="dateindent"value="<%=date1%>"/><input type="hidden" name="no" id="no">
                            </div>
                    </label></td>
                    <td> </td>
                    <td><div align="right"><strong>Entry No.</strong></div></td>
                     <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
            <td><input type="text" value="<%=hdrcode.get(3)%>" size="10"></td>
    <%}else{%>
                   <td><input type="text" name="entryno" id="entryno" value="<%=entryNo%>"/></td>
                             <%}%>
                            <div align="right"></div>
                </tr>
                <tr>
                    <td><b>Division</b></td>
                    <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
    <td><input type="text" value="<%=hdrdetails.get(9)%>" size="20"</td>
    <td><input type="hidden" name="div1" id="div1" value='<%=hdrcode.get(10)%>'></td>
    <%}else{%>
                   <td><input type="text" name="div" id="div" /></td>
                   <td><input type="hidden" name="div1" id="div1" /> </td>
              <%}%>
                    <td> </td>
                    <td> </td>
                    <td><div align="right"><strong>Unit</strong></div></td>
                   <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
    <td><input type="text" value="<%=hdrdetails.get(14)%>" size="20"</td>
    <td><input type="hidden" name="uni" id="uni" value='<%=hdrcode.get(12)%>'></td>
    <%}else{%>
                   <td><input type="text" name="unit" id="unit" /></td>
                   <td><input type="hidden" name="uni" id="uni" /> </td>
              <%}%>
                </tr>
                <tr>
    </html>
      Any suggestion on any above works is highly appreciated.
    Thanks and regards
    harshal

    Too much code. It's also not well intented nor formatted. I don't see a question either or it got lost in that heap of unformatted code.
    I will only answer the question in the thread's subject:
    How to retrieve multiple data from table and represent it in jsp pageTo retrieve, make use of HttpServletRequest#getParameterValues() and/or #getParameter().
    To display, make use of JSTL's c:forEach.

  • CRS Editor - Retrieving Timestamp database field from SQL 2005

    Hello -
    For the life of me, I cannot retrieve a database timestamp field from SQL 2005.
    I have successfully used 'cast(Date as char(30)) as DateStr' to convert to string but the DBRead statement displays the original object only as java.lang.Timestamp.  Any posts regarding this topic usually require Java skill sets above my level (creating new java class for import,...).
    There has to be an easy way to do this without being a Java programmer, yes?
    Any help here would greatly be appreciated!
    Thanks
    Andy Backus
    941.587.7199

    Andy,
    I'm guessing you know that this isn't really a date/time value in MS SQL.  According to Microsoft: 
    The Transact-SQL timestamp data type is not the same as the timestamp data type defined in the SQL-92 standard. The SQL-92 timestamp data type is equivalent to the Transact-SQL datetime data type.
    But to your question how to get the timestamp value out in a string...You'll want to use the convert function:
    select convert(varchar(10),myTimestampField) from myTable
    That will return the hex value in the column in a string format.  Also, when you retrieve the data, are you looking at the original table (which specifies the column is a timestamp), or did you create a dummy table with the columns named and formatted the way the data will be returned that UCCX can look at for the schema?  If it doesn't have the correct schema to look at, you'll have problems.
    Cliff
    please rate helpful posts

  • How to retrieve all fields from Entiy Bean

    Is there a simpler way to retrieve all fields from the entity bean than calling each individual get method?
    I need to retrieve the entire record not the contents of the entire table.
    Though, I may eventually need to do that also.
    I have 56 fields on this table. It does not make sense to code a get statement for every field.
    If you can direct me to sample code that would be good.
    Also, are there any good examples out there of how to create an entity bean or session bean using a local interface?
    Thanks,
    Jim

    I think you are confusing an EJB with a DAO.
    If you want to access the database why not just use JDBC?

  • How do I insert multiple rows from a single form ...

    How do I insert multiple rows from a single form?
    This form is organised by a table. (just as in an excel format)
    I have 20 items on a form each row item has five field
    +++++++++++ FORM AREA+++++++++++++++++++++++++++++++++++++++++++++++++++++
    +Product| qty In | Qty Out | Balance | Date +
    +------------------------------------------------------------------------+
    +Item1 | textbox1 | textbox2 | textbox3 | date +
    + |value = $qty_in1|value= &qty_out1|value=$balance1|value=$date1 +
    +------------------------------------------------------------------------+
    +Item 2 | textbox1 | textbox2 | textbox4 | date +
    + |value = $qty_in2|value= $qty_out1|value=$balance2|value=$date2 +
    +------------------------------------------------------------------------+
    + Item3 | textbox1 | textbox2 | textbox3 | date +
    +------------------------------------------------------------------------+
    + contd | | | +
    +------------------------------------------------------------------------+
    + item20| | | | +
    +------------------------------------------------------------------------+
    + + + SUBMIT + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Database Structure
    +++++++++++++++++
    + Stock_tabe +
    +---------------+
    + refid +
    +---------------+
    + item +
    +---------------+
    + Qty In +
    +---------------+
    + Qty Out +
    +---------------+
    + Balance +
    +---------------+
    + Date +
    +++++++++++++++++
    Let's say for example user have to the use the form to enter all 10 items or few like 5 on their stock form into 4 different textbox field each lines of your form, however these items go into a "Stock_table" under Single insert transaction query when submit button is pressed.
    Please anyone help me out, on how to get this concept started.

    Hello,
    I have a way to do this, but it would take some hand coding on your part. If you feel comfortable hand writing php code and doing manual database calls, specificaly database INSERT calls you should be fine.
    Create a custom form using the ADDT Custom Form Wizard that has all the rows and fields you need. This may take a bit if you are adding the ability for up to 20 rows, as per your diagram of the form area. The nice thing about using ADDT to create the form is that you can setup the form validation at the same time. Leave the last step in the Custom Form Wizard blank. You can add a custom database call here, but I would leave it blank.
    Next, under ADDT's Forms Server Behaviors, select Custom Trigger. At the Basic tab, you enter your custom php code that will be executed. Here you are going to want to put your code that will check if a value has been entered in the form and then do a database INSERT operation on the Stock_table with that row. The advanced tab lets you set the order of operations and the name of the Custom Trigger. By default, it is set to AFTER. This means that the Custom Trigger will get executed AFTER the form data is processed by the Custom Form Transaction.
    I usually just enter TEST into the "Basic" tab of the Custom Trigger. Then set my order of operations in the "Advanced" tab and close the Custom Trigger. Then I go to the code view for that page in Dreamweaver and find the Custom Trigger function and edit the code manually. It's much easier this way because the Custom Trigger wizard does not show you formatting on the code, and you don't have to keep opening the Wizard to edit and test your code.
    Your going to have to have the Custom Trigger fuction do a test on the submitted form data. If data is present, then INSERT into database. Here's a basic example of what you need to do:
    In your code view, the Custom Trigger will look something like this:
    function Trigger_Custom(&$tNG) {
    if($tNG->getColumnValue("Item_1")) {
    $item1 = $tNG->getColumnValue("Item_1");
    $textbox1_1 = $tNG->getColumnValue("Textbox_1");
    $textbox1_2 = $tNG->getColumnValue("Textbox_2");
    $textbox1_3 = $tNG->getColumnValue("Textbox_3");
    $date1 = $tNG->getColumnValue("Textbox_3");
    $queryAdd = "INSERT INTO Stock_table
    (item, Qty_In, Qty_Out, Balance, Date) VALUES($item1, $textbox1_1, $textbox1_2, $textbox1_3, $date1)"
    $result = mysql_query($queryAdd) or die(mysql_error());
    This code checks to see if the form input field named Item_1 is set. If so, then get the rest of the values for the first item and insert them into the database. You would need to do this for each row in your form. So the if you let the customer add 20 rows, you would need to check 20 times to see if the data is there or write the code so that it stops once it encounters an empty Item field. To exit a Custom Trigger, you can return NULL; and it will jump out of the function. You can also throw custom error message out of triggers, but this post is already way to long to get into that.
    $tNG->getColumnValue("Item_1") is used to retrieve the value that was set by the form input field named Item_1. This field is named by the Custom Form Wizard when you create your form. You can see what all the input filed names are by looking in the code view for something like:
    // Add columns
    $customTransaction->addColumn("Item_1", "STRING_TYPE", "POST", "Item_1");
    There will be one for each field you created with the Custom Form Wizard.
    Unfortunately, I don't have an easy way to do what you need. Maybe there is a way, but since none of the experts have responded, I thought I would point you in a direction. You should read all you can about Custom Triggers in the ADDT documentation/help pdf to give you more detailed information about how Custom Triggers work.
    Hope this helps.
    Shane

  • FWD: Re: Retrieving multiple rows from a database into morethan

    There are two ways to do this that I cn think of right off the bat.
    One is to create a class of objects that can receive the entire row, and
    give it methods that will return each of the individual objects that you are
    looking for when called. If you use INTO :ARRAY, you get the advantage of
    being able to pass the array anywhere in your system for the 'split up'
    processing.
    Two is to do basically the same thing, but instead doing the 'split up'
    during a for loop. This will appear to slow down your query, however, as
    extra processing will be occuring in terms of memory allocation and copying.
    I'm sure there other approaches. This was simply what came to mind at
    midnight, after a long day :-).
    At 01:33 AM 6/4/96 +0000, you wrote:
    Does anyone know of a way to retrieve multiple rows from a single table in an
    RDB database into more than 1 object, using a single SQL call?
    I have a single table that I wish to use some fields to populate one object
    and some others to populate another.
    The FOR clause only allows one object to be specified.
    The INTO :ARRAY clause also seems to only allow one object to be specified.
    I would appreciate any help.
    Regads,
    Steve Isaac
    Hydro Electric Commission
    Hobart TAS 7001
    Australia
    [email protected]
    James Urquhart Voice: (510)869-3400
    [email protected] Fax: (612)921-8243
    Forte Consulting

    wow, that was pleasant, the usual format goes:
    Newb: I have a problem, fix it for me
    Forum: Here's a link explaning the concept you obviously don't grasp
    Newb: No, fix it FOR me
    Forum: I'll fix you!
    Newb: WAAAAH!
    Forum: BAN!

  • Retrieving Multiple Values from a table

    Dear Experts,
    Can anyone let me know how to retrieve multiple rows from a table using Oracle BPEL Database Adapter and assign it to a output variable?
    Regards,
    Pradeep.

    If the input XML Record is as follows
    Input xmlRecord:
    <EmployeeCollection>
    <Employee>
    <id>10</id>
    <lastName>Smith</lastName>
    </Employee>
    <Employee>
    <id>20</id>
    <lastName>Ram</lastName>
    </Employee>
    </EmployeeCollection>
    I'm getting the following output when used with either queryByExample or normal SELECT option with a WHERE condition
    <EmployeeCollection>
    <Employee>
    <id>10</id>
    <lastName>Smith</lastName>
    </Employee>
    </EmployeeCollection>
    Instead of all the records in the Employee table which meet the where condition?
    I NEED OUTPUT AS FOLLOWS:
    <EmployeeCollection>
    <Employee>
    <id>10</id>
    <lastName>Smith</lastName>
    </Employee>
    <Employee>
    <id>20</id>
    <lastName>Ram</lastName>
    </Employee>
    </EmployeeCollection>
    I'm using Transformation with for-each option
    Can some one help it is very urgent.
    Thanks & Regards,
    Murali Vikrala

  • After a Lion clean install, how do I retrieve my data from external back-up? Following Apple advice for use of Migration Assistant did not work creating similar issues leading to clean install.

    After a Lion clean install, how do I retrieve my data from external hard drive?
    Following Apple advice I used Migration Assistant which crashed new system twice which is why I had to clean install Lion in the first place.
    Is there a sure way of doing it?
    I have only a few programs that I will have to install myself and that should not be a problem.
    I just want my data, music and photos back where I can use them.

    Time machine backups. I went to migration assistant a few hours ago and limited my selection to "users", no need for applications, settings and other files.  Stuff started moving over at a fast pace but has now seemed to stall.
    I will let it run overnight as there are lots of songs and photos as well as a few movies.
    If that does not work, then I will go into TM and try restore. I have restored some things in the past such a mail files and it has worked well. 
    The Apple fellow at the store told me to go right into TM, he may have had a point. I'll get it eventually.

  • How can i send multiple sms from my iphone 4

    how can i send multiple sms from my i phone 4

    Turn Group Messaging (instructions in lin that follows) off and send the message to multiple recipients. The result may be dependent on your carrier. If manually keying in numbers rather than using contacts, use the return key after each number. http://support.apple.com/kb/HT5760

  • How do I receive multiple texts from the same sender, each individually?

    How do I receive multiple texts from the same sender, each individually?

    So I receive automated reminders from my job &amp; I want them to come individually. For example, one text -- time stamped 10:14 pm, then another 11:12 am, coming as separate msgs.

  • How do I add multiple pages from my scanner to the adobe app?

    How do I add multiple pages from my scanner to the adobe app?

    You can't do this in Reader. It must be done in Acrobat on Windows or Macintosh.

  • How do I keep multiple tabs from loading all at once when I open Firefox?

    How do I prevent multiple tabs from loading every time I access Firefox? These are open tabs, but I do not want them to open simultaneously every time I want to open a new tab. Then I have to minimize each one in order to access other applications on my desktop. Please advise.

    Tools > Options -> General - Startup = select what you want Firefox to do on startup there
    '''Blank Page''' or '''Homepage''' ''(as long as those pages aren't all your Homepages)'' are alternatives to '''''windows and tabs from last time'''''
    Or as Vivek.Wilfred mentioned, upgrade to Firefox 8.0.1 where you have abother option - Don't load tabs until selected.

Maybe you are looking for

  • If sync my Iphone with an itunes library without all of my burned songs but with all of my purchases what will happen?

    My old computer along with my only decent Itunes was lost with a bad hard drive.  If i Sync my Iphone with a library only containing purchased songs will the songs burned from CD's or from other means transfer as well and can anyone recomend any Free

  • Creation of a Managed Bean in Request Scope?

    Is there an easy way to create an instance of a managed bean (configured in faces-config.xml) that was configured to be in the Request scope? If a JSP refers to it by id, then it will be there. However, when the JSP does not refer to it, it will not

  • Behaviors and CSS misbehaving on library items

    I've created a site that uses behaviors to create a NAV with Pop-up menus. There are several categories and each category has several products in it. The Categories and the products change so I wanted to create a LIBRARY item out of the NAVmenu. The

  • Do I need to start a new account?

    Have used one account for years so two teenagers could buy iTunes songs and videos. Now they are older and I just got an iPad. Looks like I am picking up my daughters contacts and calendar on my iPad. We're all using one account. Time for separate ac

  • Sales Contract

    Hi Sirs, Our scenario is that we have sales contracts with some customers valid for a fixed period ( each contract consisting a list of materials) but when we created a sales contract and want to create a sales order reference to this contract we fac