ResultSet next()  - previous()?

Hi,
I have a query that returns a large number of records (lets say larger than memory). I need to iterate over the records in a nested loops fashion and update/delete certain records.
For example, if the result set wasn't so big, I could solve the problem by reading it into an STL vector and ect, ect.
I want effectively two ResultSet objects without having the database execute the query twice. I also want to be able to reset the Result set object (send it back to the beginning).
Possibly I am attacking this problem from the wrong direction...
Thank you,
Josh

I really need a method of doing this too.
Is there a way?
I know it can be done in OCI, but what about OCCI?

Similar Messages

  • Can't get Next/Previous Buttons to work

    Hi,
    I am trying to get the next/previous buttons to work on my jsp page. I have collected data from a resultset and stored it in an arrayList. My problem is that I am getting a null pointer exception when I try to display the jsp. I have a one to many relationship 1 company to many contracts and want to be able to go backwards and forwards through the contracts using the previous/next buttons. Any suggestions would be greatly appreciated. Below is my code:
    <%
    // Connection
    String pid = request.getParameter("partID");
    if (pid == null) {
    pid = "1034";
    String pname = null;
    String ref4 = null;
    String url = null;
    String program = null;
    String tier = null;
    String numcon = null;
    String active = null;
    String publish = null;
    String agreeid = null;
    String type = null;
    String recdate = null;
    String status = null;
    String rendate = null;
    String termdate = null;
    String descrip = null;
    ArrayList agreements = new ArrayList();
    try {
    ResultSet rs = statement.executeQuery("Select p.*, a.agreeid, a.type, a.status, a.recdate, "
    + "a.descrip, a.termdate, a.rendate "
    + "from partDB.partner p, partDB.agreement as a "
    + "where p.partid = '" + pid + "'"
    + "and p.partid=a.partid ");
    while (rs.next()) {
    Agreement agreement = new Agreement();
    agreement.setAgreeID(rs.getString("agreeid"));
    agreement.setPname(rs.getString("pname"));
    agreement.setRef4(rs.getString("ref4"));
    agreement.setUrl(rs.getString("url"));
    agreement.setProgram(rs.getString("program"));
    agreement.setTier(rs.getString("tier"));
    agreement.setNumcon(rs.getString("numcon"));
    agreement.setActive(rs.getString("active"));
    agreement.setPublish(rs.getString("publish"));
    agreement.setType(rs.getString("type"));
    agreement.setRecdate(rs.getString("recdate"));
    agreement.setStatus(rs.getString("status"));
    agreement.setDescrip(rs.getString("descrip"));
    agreement.setRendate(rs.getString("rendate"));
    agreement.setTermdate(rs.getString("termdate"));
    agreements.add(agreement);
    session.setAttribute("agreements", agreements);
    catch (Exception e){
    out.println("<pre>");
    PrintWriter errorOut = new PrintWriter(out);
    e.printStackTrace(errorOut);
    out.println("<br></pre>" + e);
    %>
    <!-- InstanceBeginEditable name="main" -->
    <%
    int agreementIndex = 0;
    agreements = (ArrayList) request.getAttribute("agreements");
    if (agreements == null) {
    request.setAttribute("agreements", agreements);
    if (request.getParameter("agreementIndex") != null) {
    agreementIndex = Integer.parseInt(request.getParameter("agreementIndex"));
    Agreement agreement = (Agreement)agreements.get(agreementIndex);
    int nextIndex = 0;
    int previousIndex = 0;
    if ((agreementIndex+1) >= agreements.size()) {
    nextIndex = -1;
    } else {
    nextIndex = agreementIndex++;
    if ((agreementIndex-1) < 0) {
    previousIndex = -1;
    } else {
    previousIndex = agreementIndex--;
    %>
    <div id="mainentity"><!-- #BeginLibraryItem "/library/oppEntityHeader.lbi" -->
    <div class="section">
    <div class="sectionheader">
    <div class="sectionheadertext">
     General Information<img src="../images/collapsesection.gif" id="general_img" width="12" height="14" border="0" hspace="0" vspace="0" title="" alt="" style="vertical-align:middle" /> General Information
    </div>
    <div class="sectionbody" id="general">
    <div class="formfields">
    <table border="0" cellpadding="0" cellspacing="0">
    <tr><td class="formfieldlabel">Partner Name:</td><td class="formfieldvalue"><%=agreement.getPname() %></td></tr>
    <tr><td class="formfieldlabel">Contract:</td><td class="formfieldvalue"><%= agreement.getRef4() %></td></tr>
    <tr><td class="formfieldlabel">URL:</td><td class="formfieldvalue"><%= agreement.getUrl() %></td></tr>
    <tr><td class="formfieldlabel">Program:</td><td class="formfieldvalue"><%= agreement.getProgram() %></td></tr>
    <tr><td class="formfieldlabel">Tier:</td><td class="formfieldvalue"><%= agreement.getTier() %></td></tr>
    <tr><td class="formfieldlabel"># of Consultants:</td><td class="formfieldvalue"><%= agreement.getNumcon() %></td></tr>
    <tr><td class="formfieldlabel">Active:</td><td class="formfieldvalue"><%= agreement.getActive() %></td></tr>
    <tr><td class="formfieldlabel">Publish to Web:</td><td class="formfieldvalue"><%= agreement.getPublish() %></td></tr>
    </table>
    </div>
    </div>
    </div>
    <div class="dialogbuttons">
    <input type="button" value=" Edit " class="mmhide_btn" onmouseover="hov(this,'mmhide_btn mmhide_btnhov')" onmouseout="hov(this,'mmhide_btn')" onclick="window.location.href='#'" />
    </div>
    </div>
    <br>
    <div class="section">
    <div class="sectionheader">
    <div class="sectionheadertext">
     Agreement(s)<img src="../images/collapsesection.gif" id="codes_img" width="12" height="14" border="0" hspace="0" vspace="0" title="" alt="" style="vertical-align:middle" /> Agreement(s)
    </div>
    <div class="sectionbody" id="codes">
    <div class="formfields">
    <table border="0" cellpadding="0" cellspacing="0">
    <tr><td class="formfieldlabel">Agreement:</td><td class="formfieldvalue"><%= agreement.getType() %></td></tr>
    <tr><td class="formfieldlabel">Received Date:</td><td class="formfieldvalue"><%= agreement.getRecdate() %></td></tr>
    <tr><td class="formfieldlabel">Status:</td><td class="formfieldvalue"><%= agreement.getStatus() %></td></tr>
    <tr><td class="formfieldlabel">Description:</td><td class="formfieldvalue"><%= agreement.getDescrip() %></td></tr>
    <tr><td class="formfieldlabel">Renewal Date:</td><td class="formfieldvalue"><%= agreement.getRendate() %></td></tr>
    <tr><td class="formfieldlabel">Termination Date:</td><td class="formfieldvalue"><%= agreement.getTermdate() %></td></tr>
    </table>
    </div>
    </div>
    </div>
    <div class="dialogbuttons">
    <tr><td id="dialogbuttons" colspan="3">
    <!-- InstanceBeginEditable name="wizardbuttons" -->
    <%
    if (previousIndex != -1) {
    %>
    <input type="button" value="Previous" class="mmhide_btn" onmouseover="hov(this,'mmhide_btn mmhide_btnhov')" onmouseout="hov(this,'mmhide_btn')" onclick="window.location.href='/partDB/partners/PartnerAgree.jsp?agreementIndex=' + <%=previousIndex%>" />
    <%
    } else {
    %>
    <input type="button" value="Previous" class="mmhide_btn" onmouseover="hov(this,'mmhide_btn mmhide_btnhov')" onmouseout="hov(this,'mmhide_btn')" onclick="" disabled="disabled" />
    <%
    %>
    <%
    if (nextIndex != -1) {
    %>
    <input type="button" value=" Next " class="mmhide_btn" onmouseover="hov(this,'mmhide_btn mmhide_btnhov')" onmouseout="hov(this,'mmhide_btn')" onclick="window.location.href='/partDB/partners/PartnerAgree.jsp?agreementIndex=' + <%=nextIndex%>" />
    <%
    } else {
    %>

    Hi Annie,
    Below is the code as I have it now and am still getting the null pointer exception. Thanks for looking at this for me, I have been struggling with it since before Christmas!
    <%
    // Connection
    String pid = request.getParameter("partID");
    if (pid == null) {
    pid = "1034";
    String pname = null;
    String ref4 = null;
    String url = null;
    String program = null;
    String tier = null;
    String numcon = null;
    String active = null;
    String publish = null;
    String agreeid = null;
    String type = null;
    String recdate = null;
    String status = null;
    String rendate = null;
    String termdate = null;
    String descrip = null;
    ArrayList agreements = new ArrayList();
    %>
    <!-- InstanceBeginEditable name="main" -->
    <%
    int agreementIndex = 0;
    agreements = (ArrayList) request.getAttribute("agreements");
    if (agreements == null) {
    try {
    ResultSet rs = statement.executeQuery("Select p.*, a.agreeid, a.type, a.status, a.recdate, "
    + "a.descrip, a.termdate, a.rendate "
    + "from partDB.partner p, partDB.agreement as a "
    + "where p.partid = '" + pid + "'"
    + "and p.partid=a.partid ");
    while (rs.next()) {
    Agreement agreement = new Agreement();
    agreement.setAgreeID(rs.getString("agreeid"));
    agreement.setPname(rs.getString("pname"));
    agreement.setRef4(rs.getString("ref4"));
    agreement.setUrl(rs.getString("url"));
    agreement.setProgram(rs.getString("program"));
    agreement.setTier(rs.getString("tier"));
    agreement.setNumcon(rs.getString("numcon"));
    agreement.setActive(rs.getString("active"));
    agreement.setPublish(rs.getString("publish"));
    agreement.setType(rs.getString("type"));
    agreement.setRecdate(rs.getString("recdate"));
    agreement.setStatus(rs.getString("status"));
    agreement.setDescrip(rs.getString("descrip"));
    agreement.setRendate(rs.getString("rendate"));
    agreement.setTermdate(rs.getString("termdate"));
    agreements.add(agreement);
    session.setAttribute("agreements", agreements);
    catch (Exception e){
    out.println("<pre>");
    PrintWriter errorOut = new PrintWriter(out);
    e.printStackTrace(errorOut);
    out.println("<br></pre>" + e);
    request.setAttribute("agreements", agreements);
    if (request.getParameter("agreementIndex") != null) {
    agreementIndex = Integer.parseInt(request.getParameter("agreementIndex"));
    Agreement agreement = (Agreement)agreements.get(agreementIndex);
    int nextIndex = 0;
    int previousIndex = 0;
    if ((agreementIndex+1) >= agreements.size()) {
    nextIndex = -1;
    } else {
    nextIndex = agreementIndex++;
    if ((agreementIndex-1) < 0) {
    previousIndex = -1;
    } else {
    previousIndex = agreementIndex--;
    %>
    <div id="mainentity"><!-- #BeginLibraryItem "/library/oppEntityHeader.lbi" -->
    <div class="section">
    <div class="sectionheader">
    <div class="sectionheadertext">
     General Information<img src="../images/collapsesection.gif" id="general_img" width="12" height="14" border="0" hspace="0" vspace="0" title="" alt="" style="vertical-align:middle" /> General Information
    </div>
    <div class="sectionbody" id="general">
    <div class="formfields">
    <table border="0" cellpadding="0" cellspacing="0">
    <tr><td class="formfieldlabel">Partner Name:</td><td class="formfieldvalue"><%=agreement.getPname() %></td></tr>
    <tr><td class="formfieldlabel">Contract:</td><td class="formfieldvalue"><%= agreement.getRef4() %></td></tr>
    <tr><td class="formfieldlabel">URL:</td><td class="formfieldvalue"><%= agreement.getUrl() %></td></tr>
    <tr><td class="formfieldlabel">Program:</td><td class="formfieldvalue"><%= agreement.getProgram() %></td></tr>
    <tr><td class="formfieldlabel">Tier:</td><td class="formfieldvalue"><%= agreement.getTier() %></td></tr>
    <tr><td class="formfieldlabel"># of Consultants:</td><td class="formfieldvalue"><%= agreement.getNumcon() %></td></tr>
    <tr><td class="formfieldlabel">Active:</td><td class="formfieldvalue"><%= agreement.getActive() %></td></tr>
    <tr><td class="formfieldlabel">Publish to Web:</td><td class="formfieldvalue"><%= agreement.getPublish() %></td></tr>
    </table>
    </div>
    </div>
    </div>
    <div class="dialogbuttons">
    <input type="button" value=" Edit " class="mmhide_btn" onmouseover="hov(this,'mmhide_btn mmhide_btnhov')" onmouseout="hov(this,'mmhide_btn')" onclick="window.location.href='#'" />
    </div>
    </div>
    <br>
    <div class="section">
    <div class="sectionheader">
    <div class="sectionheadertext">
     Agreement(s)<img src="../images/collapsesection.gif" id="codes_img" width="12" height="14" border="0" hspace="0" vspace="0" title="" alt="" style="vertical-align:middle" /> Agreement(s)
    </div>
    <div class="sectionbody" id="codes">
    <div class="formfields">
    <table border="0" cellpadding="0" cellspacing="0">
    <tr><td class="formfieldlabel">Agreement:</td><td class="formfieldvalue"><%= agreement.getType() %></td></tr>
    <tr><td class="formfieldlabel">Received Date:</td><td class="formfieldvalue"><%= agreement.getRecdate() %></td></tr>
    <tr><td class="formfieldlabel">Status:</td><td class="formfieldvalue"><%= agreement.getStatus() %></td></tr>
    <tr><td class="formfieldlabel">Description:</td><td class="formfieldvalue"><%= agreement.getDescrip() %></td></tr>
    <tr><td class="formfieldlabel">Renewal Date:</td><td class="formfieldvalue"><%= agreement.getRendate() %></td></tr>
    <tr><td class="formfieldlabel">Termination Date:</td><td class="formfieldvalue"><%= agreement.getTermdate() %></td></tr>
    </table>
    </div>
    </div>
    </div>
    <div class="dialogbuttons">
    <tr><td id="dialogbuttons" colspan="3">
    <!-- InstanceBeginEditable name="wizardbuttons" -->
    <%
    if (previousIndex != -1) {
    %>
    <input type="button" value="Previous" class="mmhide_btn" onmouseover="hov(this,'mmhide_btn mmhide_btnhov')" onmouseout="hov(this,'mmhide_btn')" onclick="window.location.href='/partDB/partners/PartnerAgree.jsp?agreementIndex=' + <%=previousIndex%>" />
    <%
    } else {
    %>
    <input type="button" value="Previous" class="mmhide_btn" onmouseover="hov(this,'mmhide_btn mmhide_btnhov')" onmouseout="hov(this,'mmhide_btn')" onclick="" disabled="disabled" />
    <%
    %>
    <%
    if (nextIndex != -1) {
    %>
    <input type="button" value=" Next " class="mmhide_btn" onmouseover="hov(this,'mmhide_btn mmhide_btnhov')" onmouseout="hov(this,'mmhide_btn')" onclick="window.location.href='/partDB/partners/PartnerAgree.jsp?agreementIndex=' + <%=nextIndex%>" />
    <%
    } else {
    %>
    <input type="button" value=" Next " class="mmhide_btn" onmouseover="hov(this,'mmhide_btn mmhide_btnhov')" onmouseout="hov(this,'mmhide_btn')" onclick="" disabled="disabled" />
    <%
    %>

  • How can i create an album with chose category list and next/previous button

    hello guys im working on a project for my uni i finished the whole website but one thing is missing
    i need to create a photo album with next and previous button, with choosing a category and inside each category i have like 5 pictures and i can change with the next/previous buttons to see another picture of the  same category.
    Please see the picture below to see what i mean.
    some told me it needs flash but i dont know how to work on it :S so plz if anyone can help me
    thank you

    Dear Mr. Murphy,
    thank you for your help.
    Actually i have tried to search for a tutorial and i found that one that was very helpful and gave me the half solution. the part i found and it worked with me is the part of the next and previous buttons and moving from an image to another.
    SO the part i still need is the list so when i click on a category i get the pictures of the chosen category, I had the idea of create a flash for each category alone and maybe i will be able to add them all together.
    But i guess it's too much work and there must be a way where i can make it all in one flash file.
    If you have any idea let me know please, thank you again for your help and i'm trying to search for the AS3 image gallery as you told me.
    Regards

  • How to search this forum by tags, answered questions, and quickly navigate to next/previous posts

    New user to these forums. I've read all the Search documentation.
    1. How do I search this forum by tags?
    2. Is there a way to view just the posts that were answered or where the original poster found some help?
    3. Is there a way to quickly move to next/previous posts without having to backtrack to the list of posts and then manually click the next/previous post?
    Thanks!

    New user to these forums. I've read all the Search documentation.
    1. How do I search this forum by tags?
    2. Is there a way to view just the posts that were answered or where the original poster found some help?
    3. Is there a way to quickly move to next/previous posts without having to backtrack to the list of posts and then manually click the next/previous post?
    Thanks!

  • CF Set form.variable for query and Next/Previous pages error

    I have a CF form with a select that posts to a CF "action" page.
    On the action page I: CFSET ItemNumber=#form.ItemNumber#
    I CFOUTPUT the 'ItemNumber' into the CFQUERY (which is an Inner Join dependant on the '#ItemNumber#')...
    All of the above works just fine and displays the database fields in color alternating rows, per the rest of the code.
    Here's the problem:
    I'm displaying 40 rows on a page per "Next and Previous" code. (CFPARAM name="start" default="1" and CFPARAM name="disp" default="40" along with the rest of the NextN code in the header and body). This does display 40 rows on the page and puts a link at the bottom of the page "Next 40 Rows", etc.
    Note: I'm only querying the database once and using the query (query name="data") to populate the table rows And the NextN code (CFOUTPUT name="data") And (CFIF start + disp GREATER THAN data.RecordCount, etc)...
    The problem happens when you click the "Next 40 Rows" link to display the 2nd page of rows. Since (I'm assuming) this NextN code is 're-reading' the same page from top to bottom, an error is thrown when the code tries to read the CFSET ItemNumber=#form.ItemNumber# at the top of the page.
    With the #form.ItemNumber# on this action page Originally coming from the previous posting of the form to this action page, when the "Next 40 Rows" link is clicked and the NextN code re-reads this action page - the CFSET ItemNumber (#form.ItemNumber) is not getting populated and throws the error...
    I hope I've not made this sound confusing.
    I can get the NextN code to work when I'm just querying the database without "flying in" a form variable. But when I CFSET a variable (#form.ItemNumber#) that is inserted into the query, the second page of the NextN throws an error and doesn't display.
    I would include the page code here but it would be fairly lengthy and, as well, the NextN code is a 'standard' CF code -- I've narrowed the problem down to the above "Element is undefined" (when the page tries to reload from the "Next 40 Rows" link) and am hoping there's a simple fix or another way to display the records in Next and Previous pages.
    Thanks to anyone in advance for shedding light on this.
    - e

    Thank you for the reply, Owain.
    Yes - The Next/Previous at the bottom of the page are hyperlinks.
    <a href="ThisPage.cfm?start=#Evaluate("start + disp")#">
    The following is at the top of the page (and is the variable from the form that I CFOUTPUT in the query):
    <cfparam name="ItemNumberDropdown01" default="">
    <cfset ItemNumber = #form.ItemNumberDropdown01#>
    The error report showed that the "Next Page" hyperlink was reading an undefined variable... although when the "action page" first opens from the form posting to it, it populates the CFSET just fine (per the cfparam and cfset above)... As you mention, the hyperlink clearing the form scope is what causes the error in trying to display the next set of records...
    The form page and the 'action page' are both secure pages with an application page setting the session, etc. Am I at risk in using an URL scope?
    Where would this URL scope be put? (The href is shown above - would the URL scope go in this? - How would this be written?)
    The CFPARAM and CFSET would still exist at the top of the 'action page' and still throw an error wouldn't it or would this be replaced with something else to read the form.variable for this 'first' action page to be displayed?
    Thanks again for the 'education' on this...
    - ed

  • Page numbers navigation bar instead of the standard first-next-previous-last

    I want to add page numbers to my navigationbar instead of the standard "first next previous last".
    For example I have a repeat region with a navigation bar (standard) I have 7 records per page and I would like it to say at the bottom:
    1 2 3 4 5 ect. Is there any way I can code this up with php or with dreamweaver or is there an other way to do this.
    Any help welcome

    You can do it in DW
    Add the below code
    <div class="pages">
    <ul>
    <li class="prev"><a href="#">&laquo; Previous</a></li>
    <li><a href="#">1</a></li>
    <li><a href="#">2</a></li>
    <li class="ellipsis"><strong>&hellip;</strong></li>
    <li><a href="#">6</a></li>
    <li class="current"><strong>7</strong></li>
    <li><a href="#">8</a></li>
            <li class="ellipsis"><strong>&hellip;</strong></li>
    <li><a href="#">14</a></li>
    <li><a href="#">15</a></li>
    <li class="next"><a href="#">Next &raquo;</a></li>
    </ul>
    </div>
    style it as
    .pages{display:block; width:100%; text-align:center; clear:both; font-family:Verdana, Geneva, sans-serif;}
    .pages ul{margin:0; padding:0; list-style:none;}
    .pages li{display:inline;}
    .pages strong{font-weight:normal;}
    .pages .next{margin:0;}
    .pages a,.pages .current strong, .pages .ellipsis strong{display:inline-block; padding:2px 6px; margin:0 2px 0 0;}
    .pages a{border:1px solid #DFDFDF;}

  • Next / Previous button throwing an error. Please help

    I wrote this next previous button code and it is throwing an
    error. I don't understand why or what I am missing.
    I want it to show 4 records for a page. Here is my code and
    the error.
    Code:
    <cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
    <cfquery name="feat" datasource="#sitedatasource#"
    username="#siteUserID#" password="#sitePassword#" maxRows=4>
    SELECT feature.title AS ViewField1, feature.MYFile AS
    ViewField2, feature.ID AS ID
    FROM feature
    </cfquery>
    <cflock timeout="2" scope="application"
    type="READONLY">
    <cfset application.feat=feat>
    </cflock>
    <cfset MaxRows_feat=4>
    <cfset
    StartRow_feat=Min((PageNum_feat-1)*MaxRows_feat+1,Max(feat.RecordCount,1))>
    <cfset
    EndRow_feat=Min(StartRow_feat+MaxRows_feat-1,feat.RecordCount)>
    <cfset
    TotalPages_feat=Ceiling(feat.RecordCount/MaxRows_feat)>
    <cfset QueryString_feat=Iif(CGI.QUERY_STRING NEQ
    "",DE("&"&CGI.QUERY_STRING),DE(""))>
    <cfset
    tempPos=ListContainsNoCase(QueryString_feat,"PageNum_feat=","&")>
    <cfif tempPos NEQ 0>
    <cfset
    QueryString_feat=ListDeleteAt(QueryString_feat,tempPos,"&")>
    </cfif>
    <cflock timeout="2" scope="application"
    type="READONLY"><cfoutput query="feat"
    maxrows="4">#ViewField1#</cfoutput></cflock>
    <cfif PageNum_feat GT 1>
    <a
    href="#CurrentPage#?PageNum_feat=#Max(DecrementValue(PageNum_feat),1)##QueryString_feat#"
    onmouseout="MM_swapImgRestore()"
    onmouseover="MM_swapImage('Previous','','../img/previous-over.gif',1)"><img
    src="../img/previous.gif" alt="Previous Records" name="Previous"
    width="96" height="27" border="0" id="Previous" /></a>
    <cfif PageNum_feat LT TotalPages_feat>
    <a
    href="#CurrentPage#?PageNum_feat=#Min(IncrementValue(PageNum_feat),TotalPages_feat)##Quer yString_feat#"
    onmouseout="MM_swapImgRestore()"
    onmouseover="MM_swapImage('next','','../img/next-over.gif',1)"><img
    src="../img/next.gif" alt="Next Record" name="next" width="96"
    height="27" border="0" id="next" /></a>
    The Error:
    Variable PAGENUM_FEAT is undefined.
    The error occurred in
    C:\Websites\x9vdzd\feature\featured.cfm: line 8
    6 : </cfquery>
    7 : <cfset MaxRows_feat=4>
    8 : <cfset
    StartRow_feat=Min((PageNum_feat-1)*MaxRows_feat+1,Max(feat.RecordCount,1))>
    9 : <cfset
    EndRow_feat=Min(StartRow_feat+MaxRows_feat-1,feat.RecordCount)>
    10 : <cfset
    TotalPages_feat=Ceiling(feat.RecordCount/MaxRows_feat)>
    I thought I had it defined! What am I missing?
    Thanks
    Phoenix

    that is strange... it should work fine - it does in my tests.
    here is somewhat updated & modified code to try. i have
    included
    comments to try and explain what is being done.
    basic logic is as follows:
    -form is submitted
    -check if file has been selected
    -try uploading new file
    -if new file upload succeeds, delete old file if it exists
    (as part of
    updating existing record, as new records obviously would not
    have any
    old image)
    -update/insert record data as necessary
    here's the code:
    <cfif isdefined("form.feat_OK")><!--- form submitted
    --->
    <!--- set file uploading vars --->
    <cfparam name="fileuploaded" type="boolean"
    default="false">
    <cfparam name="uploadedfile" default="">
    <cfset pathToFile = "c:\websites\x9vdzd\img\feature\">
    <!--- --->
    <cfif len(trim(form.MYFile))><!--- if a file has
    been selected --->
    <!--- try uploading new file --->
    <cftry>
    <cffile Action="upload" filefield="MYFile"
    accept="image/gif,
    image/jpg, image/jpeg, image/pjpeg"
    destination="#pathToFile" nameconflict="MAKEUNIQUE">
    <cfset fileuploaded = true>
    <cfset uploadedfile = cffile.serverfile>
    <cfcatch type="any">
    <!--- if upload did not suceed, reset file uploading vars
    --->
    <cfset fileuploaded = false>
    <cfset uploadedfile = "">
    <!--- this can be further enhanced by setting some var to
    hold error
    message and return it to user --->
    </cfcatch>
    </cftry>
    </cfif>
    <cfif form.id gt 0><!--- we are updating an
    existing record --->
    <!--- if new file upload was successful and the feature
    has an image
    associated with it - delete old image --->
    <cfif fileuploaded is true AND
    len(trim(form.oldimage))>
    <cfif FileExists(pathToFile & form.oldimage)>
    <cffile action="delete" file="#pathToFile &
    form.oldimage#">
    </cfif>
    </cfif>
    <cfquery datasource="#sitedatasource#"
    username="#siteUserID#"
    password="#sitePassword#">
    UPDATE feature
    SET
    feature.title=<cfqueryparam cfsqltype="cf_sql_varchar"
    value="#form.title#">,
    feature.Body=<cfqueryparam cfsqltype="cf_sql_longvarchar"
    value="#form.PDSeditor#">,
    feature.MYFile=<cfqueryparam cfsqltype="cf_sql_varchar"
    value="#uploadedfile#" null="#NOT fileuploaded#">
    WHERE ID = <cfqueryparam value="#form.ID#"
    cfsqlType="CF_SQL_INTEGER">
    </cfquery>
    <cfelse><!--- we are inserting a new record --->
    <cfquery datasource="#sitedatasource#"
    username="#siteUserID#"
    password="#sitePassword#">
    INSERT INTO feature
    (title, body, MYFile)
    VALUES
    (<cfqueryparam cfsqltype="cf_sql_varchar"
    value="#form.title#">,
    <cfqueryparam cfsqltype="cf_sql_longvarchar"
    value="#form.PDSeditor#">,
    <cfqueryparam cfsqltype="cf_sql_varchar"
    value="#uploadedfile#"
    null="#NOT fileuploaded#">)
    </cfquery>
    </cfif>
    <!--- relocate user to previous page after insert/update
    --->
    <cflocation url="feature-manager.cfm">
    </cfif>
    hth
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

  • Next previous button in gallery

    Hi guys, been a while, hope everyone is well.  I am having a problem implementing a next/previous button on an image once it has been enlarged in my gallery.  I have done it in pure as3 but all tutorials seem to use the timeline.  I will post my code underneath so you can see what I am up too.  The next/previous button should I think be added to the modelClicked function.
    From what I understand, I will get a next/previous button and turn them into a button object.  I will then delete them from my stage and instantiate them within the class below.  I would then add them to the modelClicked function with events tied to them.  What should I then do in these events to make it fit in with the code below?
    Any advise appreciated,
    Cheers
    Nick
    package classes.models
        import flash.display.Bitmap;
        import flash.display.Loader;
        import flash.display.MovieClip;
        import flash.display.Sprite;
        import flash.geom.Rectangle;
        import flash.events.MouseEvent;
        import flash.events.Event;
        import flash.net.URLRequest;
        import eu.flashlabs.ui.BasicButton;
        import classes.ui.StateClip;
        import classes.ui.Placeholder;
        import classes.utils.URLUtil;
        import classes.vo.ModelsStates;
        import fl.containers.ScrollPane;
        import fl.controls.ProgressBar;
        import com.greensock.TweenLite;
        public class IndividualModel extends StateClip
            // CONSTANTS
            private static const PADDING_TOP:Number= 28;
            private static const PADDING_LEFT:Number= 50;
            private static const COLS:int= 4;
            private static const ROWS:int= 8;
            private static const GAP_HORIZONTAL:Number= 5;
            private static const GAP_VERTICAL:Number= 5;
            // MEMBER VARIABLES
            private var _data:XML;
            public function get data():XML
                return _data;
            public function set data(value:XML):void
                setData(value);
            private var items:Array;
            private var backBtn:BasicButton;
            private var itemsHolder:MovieClip;
            private var loadIndex:int;
            private var sp:ScrollPane;
            private var clonedBitmap:Bitmap;
            private var originalBitmap:Bitmap;
            private var rect:Rectangle;
            private var screen:Sprite = new Sprite();
            public function IndividualModel()
                super();
                items = [];
                addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
            private function addedToStageHandler(event:Event):void
                initChildren();
            private function initChildren():void
                itemsHolder = new MovieClip();
                addChild(itemsHolder);
                sp = getChildByName("mc_pane") as ScrollPane;
                backBtn = getChildByName("btn_back") as BasicButton;
                backBtn.addEventListener(MouseEvent.CLICK, backBtn_clickHandler);
                screen.graphics.beginFill(0x111111, .75);
                screen.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
                screen.graphics.endFill();
            public function destroy():void
                clearItems();
            // PUBLIC INTERFACE
            // LAYOUT
            private function clearItems():void
                while (items.length > 0)
                    var item:ModelsItem = items.pop() as ModelsItem;
                    itemsHolder.removeChild(item);
                    item.destroy();
            private function populateItems():void
                for (var i:int = 0; i < Math.min(COLS * ROWS, data.picture.length()); i++)
                    var item:ModelsItem = new ModelsItem();
                    item.data = data.picture[i];
                    item.x = PADDING_LEFT + (i % COLS) * (ModelsItem.ITEM_WIDTH + GAP_HORIZONTAL);
                    item.y = PADDING_TOP + Math.floor(i / COLS) * (ModelsItem.ITEM_HEIGHT + GAP_VERTICAL);
                    /*item.addEventListener(MouseEvent.CLICK, modelClicked);*/
                    itemsHolder.addChild(item);
                    /*item.mouseEnabled = false;*/
                    sp.source = itemsHolder;
                    items.push(item);
                sp.verticalScrollPolicy = "on";
                sp.horizontalScrollPolicy = "off";
                sp.update();
            // PICTURE LOADING
            private function loadNextPicture():void
                if (loadIndex < items.length)
                    var loader:Loader = new Loader();
                    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadNextPicture_completeHandler);
                    var item:ModelsItem = items[loadIndex] as ModelsItem;
                    loader.load(new URLRequest(URLUtil.getURL([email protected]())));
                    /*item.mouseEnabled = true;*/
            private function loadNextPicture_completeHandler(event:Event):void
                event.target.removeEventListener(Event.COMPLETE, loadNextPicture_completeHandler);
                ModelsItem(items[loadIndex]).bitmap = event.target.content as Bitmap;
                ModelsItem(items[loadIndex]).addEventListener(MouseEvent.CLICK, modelClicked);
                loadIndex++;
                loadNextPicture();
            // EVENT HANDLERS
            private function backBtn_clickHandler(event:MouseEvent):void
                state = ModelsStates.HIDDEN;
            private function modelClicked(e:MouseEvent):void
                stage.addChild(screen);
                var item:ModelsItem = e.currentTarget as ModelsItem;
                originalBitmap = item.bitmap;
                clonedBitmap = new Bitmap(originalBitmap.bitmapData.clone());
                stage.addChild(clonedBitmap);
                rect = originalBitmap.getBounds(stage);
                clonedBitmap.x = rect.x;
                clonedBitmap.y = rect.y;
                clonedBitmap.width = rect.width;
                clonedBitmap.height = rect.height;
                clonedBitmap.smoothing = true;
                TweenLite.to(clonedBitmap, 1, { x: (stage.stageWidth - originalBitmap.width) / 4, y: (stage.stageHeight - originalBitmap.height) / 6, onComplete:zoomInFinished, scaleX: 1, scaleY: 1 });
            private function zoomInFinished():void
                trace("Zoom In Finished");
                stage.addEventListener(MouseEvent.CLICK, mouseClicked);
            private function mouseClicked(e:MouseEvent):void
                TweenLite.to(clonedBitmap, 1, { x: rect.x, y: rect.y, onComplete:zoomOutFinished, width: rect.width, height: rect.height});
                stage.removeEventListener(MouseEvent.CLICK, mouseClicked);
            private function zoomOutFinished():void
                trace("Mouse Clicked");
                stage.removeChild(screen);
                stage.removeChild(clonedBitmap);
            // GETTERS & SETTERS
            private function setData(value:XML):void
                _data = value;
                clearItems();
                populateItems();
                loadIndex = 0;
                loadNextPicture();
                state = ModelsStates.SHOWN;
            // UTILS
            override protected function animateInComplete():void
                super.animateInComplete();
                switch (state)
                    case ModelsStates.SHOWN :
                        break;
                    case ModelsStates.HIDDEN :
                        break;

    I don't actually know how you're loading your data.  It's also very difficult to figure out what's happening in your code, since you're extending Classes you don't show. What I can tell you is that you need to store the data about iterating each collection at the level where it's needed. You may want to look at the composite pattern http://www.as3dp.com/2007/05/composite-pattern-book-part-1/ .
    In my opinion, the biggest problem you have is poor separation of concerns--you call things Models that are clearly Views, and because you are storing relevant data in Views rather than simply using your Views to represent data, you're making the task of representing and iterating through your data much harder than it needs to be.
    The ideal structure would be a data structure that has data for each thumbnail in some sort of collection, like an Array or Vector. This data structure would only be responsible for storing the data and maintaining a pointer to the currently selected thumbnail.  When the pointer changes, the data object dispatches a change event, so Views that care about this pointer can update. Each piece of data could then have a member variable that is one of these collections that manages the correct pointer.  That's where the composite pattern comes in.
    Now, the task of building your Views becomes much easier. You have one View that gets a collection and shows all the thumbnails and one View that gets a specific thumbnail, mix and match as needed. The Views, again watch the change event and do whatever they need to do when the pointer changes.
    At this point, who sets the pointer ceases to matter. It can be inside one of your Views or outside any of your Views--when the pointer changes, the View that is watching that particular collection will update, and if the result of that update is that a nested View then watches a different collection, that's ok--it still follows the same principles.

  • Creating next/previous buttons problem

    I am creating next & previous buttons on my main scene. I have created a scrolling photo gallery as well as a random button to randomly select images. I have a photos layer that has 15 images tagged in the AS "img1" "img2"....hopefully this all makes sense so far.
    What script can I use to easily create a next_btn. This is what I currently have
    next_btn.onRelease = function() {
        photos.gotoAndStop("img"+1);
        photos.fader.gotoAndPlay(2);
    "img"+1 goes to the "img1" however I would like it to go to the next img instead of always go to img1. I've tried _currentframe+10 (images are 10 frames apart) and some others but cannot seem to get it to work.
    I would like this to work along with the random button so that when a random image is clicked, the person can click the next button and get to the next image.
    Current script in...
    random_btn.onRelease = function(){
        var picNum:Number
        picNum = Math.ceil(Math.random()*15);
        photos.gotoAndStop("img"+picNum);
        photos.fader.gotoAndPlay(2);
    next_btn.onRelease = function() {
        photos.gotoAndStop("img"+1);
        photos.fader.gotoAndPlay(2);
    if you need any clarification let me know! thanks!

    i'll try to explain this simplier.
    scene 1 (layers)
    inside layers
    AS
    next back btn
    random btn
    photos
    displays images when clicked on from photo gallery
    scrolling photo gallery
    photo gallery + buttons for gallery
    i'm looking to create a simple < > prev and next image buttons.
    My current script from above (original post) hasn't worked out.
    random_btn.onRelease = function(){
        var picNum:Number
        picNum = Math.ceil(Math.random()*15);
        photos.gotoAndStop("img"+picNum);
        photos.fader.gotoAndPlay(2);
    next_btn.onRelease = function() {
        photos.gotoAndStop(picNum+1);
        photos.fader.gotoAndPlay(2);
    I'll take out the random_btn if need be to create just a regular next button and previous button. (i'll worry about tracking the scrolling image gallery later...one issue at a time)
    Thanks again.

  • Xml gallery with thumbnails & next/previous buttons.

    hallo all the wise people,
    sorry to bother you, but i'm kind of desperate, and nobody around to ask, so....
    i've spend now three full days editing an xml gallery... to my needs, and always goes messy, so maybe it's time give up and make my own from the scratch, or looking from a one closer to my needs =/ (helpless).
    could anyone help - maybe any of you by some chance knows a link as close as possible to tutorial/source as3 fla to sthg as close as possible to this:
    a) xml gallery
    b) thumbnails
    c) when thumbnail clicked a big picture shows
    d) next/previous buttons possible
    otherwise, i can also post the code of my gallery where i absolutely can't add next/previous buttons without making a big mess =/
    i will be totally youbie doubie grateful for any help... any, if you only know any good link, 'll try to fugure out a tutorial or edit the source myself....
    thanks in advance

    heyyyo wise one,
    at least this is really  nice of you to ask -  this gallery really makes me by now feel twice as blond as i am 8-0. but this is kinda really nested.
    the xml structure goes like this (this is easy and more or, less standard)(Caption is neglectable, probabaly i will not even display it, unless i have some extra time):
    <MenuItem>
             <picnum>01</picnum>
             <thumb>thumbs/Image00001.jpg</thumb>  
             <picture>Image00001.jpg</picture>
       <Caption>Fist Title</Caption> 
    </MenuItem>
    uaaha, then the as goes. there is the URLloader, but also two different loaders inside (one for the thumbnails, one for the big picture). and this is all inside a for each loop -eh... i was always trying to change the pictLdr behavior - the loader, that loads the big picture.
    anyway the URL loader, and the main function, which is attached to it go like this:
    var myXML:XML = new XML();
    var XML_URL:String = "gallery_config.xml";
    var myXMLURL:URLRequest = new URLRequest(XML_URL);
    var myLoader:URLLoader = new URLLoader(myXMLURL);
    myLoader.addEventListener("complete", xmlLoaded);
    // Create the xmlLoaded function
    function xmlLoaded(event:Event):void
    // Place the xml data into the myXML object
        myXML = XML(myLoader.data);
        // Initialize and give var name to the new external XMLDocument
    var xmlDoc:XMLDocument = new XMLDocument();
    // Ignore spacing around nodes
        xmlDoc.ignoreWhite = true;
    // Define a new name for the loaded XML that is the data in myLoader
        var menuXML:XML = XML(myLoader.data);
    // Parse the XML data into a readable format
        xmlDoc.parseXML(menuXML.toXMLString());
        // Access the value of the "galleryFolder" node in our external XML file
    for each (var galleryFolder:XML in myXML..galleryFolder)
       // Access the value of the "pagenum" node in our external XML file
               var galleryDir:String = galleryFolder.toString();
    //trace (galleryDir);
    //trace (galleryFolder);//output taki sam jak powyżej
    // inicjuję variable flag, która bedzie trzsymac nazwę klikniętego thumbnail
    var flag2:String = null;
    // Set the index number of our loop, increments automatically
    var i:Number = 0;
    // Run the "for each" loop to iterate through all of the menu items listed in the external XML file
    for each (var MenuItem:XML in myXML..MenuItem)
    // Access the value of the "picnum" node in our external XML file
        var picnum:String = MenuItem.picnum.toString();
    // Access the value of the "pagetext" node in our external XML file
        var Caption:String = MenuItem.Caption.toString();
    // Access the value of the "thumb" node in our external XML file
        var thumb:String = MenuItem.thumb.toString();
    // Access the value of the "pagepicture" node in our external XML file
        var picture:String = MenuItem.picture.toString();
    // Just some trace I used for testing, tracing helps debug and fix errors
    //trace(picnum);
    var thumbLdr:Loader = new Loader();
        var thumbURLReq:URLRequest = new URLRequest(galleryDir + thumb);
        thumbLdr.load(thumbURLReq);
    // Create MovieClip holder for each thumb
    var thumb_mc = new MovieClip();
    thumb_mc.addChild(thumbLdr);
    addChildAt(thumb_mc, 1);
      // Create the rectangle used for the clickable button we will place over each thumb
      var rect:Shape = new Shape;
      rect.graphics.beginFill(0xFFFFFF);
      rect.graphics.lineStyle(1, 0x999999);
      rect.graphics.drawRect(0, 0, 80, 80);      
      // Create MovieClip holder for each button, and put that rectangle in it,
      // make button mode true and set it to invisible
      var clip_mc = new MovieClip();
      clip_mc.addChild(rect);
      addChild(clip_mc);
      clip_mc.buttonMode = true;
      clip_mc.alpha = .0;
         // The following four conditionals create the images where the images will live on stage
      // by adjusting math through each row we make sure they are laid out good and not stacked
      // all on top of one another, or spread out in one long row, we need 4 rows, so the math follows
      if (picnum < "05")
           line1xpos = line1xpos + distance; // These lines place row 1 on stage
        clip_mc.x = line1xpos;
        clip_mc.y = yPlacement;
        thumb_mc.x = line1xpos;
        thumb_mc.y = yPlacement;
       else  if (picnum > "04" && picnum < "11")
        line2xpos = line2xpos + distance; // These lines place row 2 on stage  
        clip_mc.x = line2xpos;
        clip_mc.y = 86;
        thumb_mc.x = line2xpos;
        thumb_mc.y = 86;
       else  if (picnum > "10" && picnum < "14")
        line3xpos = line3xpos + distance; // These lines place row 3 on stage
        clip_mc.x = line3xpos;
        clip_mc.y = 172;
        thumb_mc.x = line3xpos;
        thumb_mc.y = 172;
       else  if (picnum > "13" && picnum < "21")
       line4xpos = line4xpos + distance; // These lines place row 4 on stage
       clip_mc.x = line4xpos;
       clip_mc.y = 258;
       thumb_mc.x = line4xpos;
       thumb_mc.y = 258;
       // And now we create the pic loader for the larger images, and load it into "pictLdr"
       var pictLdr:Loader = new Loader();
       var pictURL:String = picture;
          var pictURLReq:URLRequest = new URLRequest(galleryDir + picture);
       //var pictURLReq:URLRequest = new URLRequest("gallery/Image00004.jpg");sprawia,ze zawsze wyswitla sie jeden obrazek
          pictLdr.load(pictURLReq);
       // Access the pic value and ready it for setting up the Click listener, and function
          clip_mc.clickToPic = pictLdr;
       // Access the text value and ready it for setting up the Click listener, and function
       clip_mc.clickToText = Caption;
       //var instName:String = flag();
       // Add the mouse event listener to the moviClip button for clicking
          clip_mc.addEventListener (MouseEvent.CLICK, clipClick);
          // Set the function for what happens when that button gets clicked
       function clipClick(e:Event):void
         // Populate the parent clip named frameSlide with all of the necessary data
         MovieClip(parent).frameSlide.gotoAndPlay("show"); // Makes it appear(slide down)
         MovieClip(parent).frameSlide.caption_txt.text = e.target.clickToText; // Adds the caption
         MovieClip(parent).frameSlide.frame_mc.addChild(e.target.clickToPic); // Adds the big pic
       } // This closes the "for each" loop
    } // And this closes the xmlLoaded function
    and the effect looks like this (it's a sketch, so big pictures are loaded randomly, don;t put too much attention to it): http://bangbangdesign.pl/xmlGallery/gallery29.swf
    but i guess it's a terrible stuff to go through all this. i would be totallly satisfied with a likng to a good tutorial to do it from scratch, or just a hint where to start rebuilding this.
    + in any case i send greetinngs to whereever you are =]

  • I need a flash tutorial on Iphone style Scrolling Photo Gallery using Next/previous Buttons

    Here i have attached two sample Fla files of  iphone style scrolling photo gallery using next Previous buttons. Smoothscroller.fla is the  original file download from internet and thumbscroll.fla is the one i m trying to make. But i m getting the actionscript error in the movieclip symbol 2 frame 2 actionscript frame. Can anyone work out on my file & send me the easiest tutorial of flash so that i can complete my portfolio project.
    Mail me ur tutorials at : [email protected]

    Just Google for the Spry photo gallery and you might find
    http://cates-associates.net/tutorials/Tutorial-CS3-Spry.html
    or even a few others.
    Happy Sprying
    Ben

  • Why doesn't Firefox run an adobe flash player slide show (no arrows to move to next/previous slide), but internet explore does?

    When I try to run a slide show in Firefox, the first slide displays but the arrows to move to next/previous slide do not appear. When I try in Internet Explorer, the arrows appear. Flash Player is enabled in Firefox. There must be another setting I need to adjust. I am running Windows 7. I don't see how to access Tools menu item in Firefox. I don't see where I can check my Firefox version. It is the current version as is Flash Player.

    When I try to run a slide show in Firefox, the first slide displays but the arrows to move to next/previous slide do not appear. When I try in Internet Explorer, the arrows appear. Flash Player is enabled in Firefox. There must be another setting I need to adjust. I am running Windows 7. I don't see how to access Tools menu item in Firefox. I don't see where I can check my Firefox version. It is the current version as is Flash Player.

  • Move next/previous buttons in a region with over 100 items

    Hi,
    Is there a way to show items in a region in chunks and then have a move next/previous buttons. I have a region on a page that has over 100 items how can I show 10 items a time and then have move next/previous buttons. I am using 10.1.2.0.2
    Thanks

    In the "what to search" tab, select the pagegroup where stands your page.
    below teh pagegroup selection you got an option named "Which pages should be searched?"
    Browse to your page.
    Leave the search criterias blank (so taht the portlet won't make any filter)
    In the "results display" tab, select the pagination.
    Now, your portlet will display all items on your page.
    The best way to use it is to put all your items on page1.
    Create a page2 with only this portlet configured to serach for all items on page1.
    In your portal, just make a link to page2.
    hope this will be helpfull.

  • ResultSet.next() and resultset.islast() problem

    I have query which returns 10 records. I run the using preparedStatement. When i use the while(resultSet.next()), the loop runs untill 10 records and after that when it come to the while check it hangs.
    Sample code
    pstmt= conn.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    rs = pstmt.executeQuery();
    while (rsAccessNoEq.next()) {...
    Then i added the code in the while loop
    if(rs.isLast()){
    return;
    For the first iteration itself the theisLast() is true and it terminates from the loop.
    Please help me

    public class ISP {
         private GFA gestorFic = null;
         private GCA gestorCad = null;
         private GBDAgestor = null;
         private String path = null;
         ServiceProcessVO javaIntra = null;
         ServiceProcessVO javaIntra1 = null;
         ServiceProcessVO javaIntra2 = null;
         ServiceProcessVO javaIntra3 = null;
         ArrayList dataList = null;
         List dataFile = null;
         ArrayList dataList1 = null;
         ArrayList dataList2 = null;
         ArrayList dataList3 = null;          
         public final void iP() throws SQLException,
         MCEA {
         ResultSet rsIntraHq = null;
              Connection connIntraHq = null;
              PreparedStatement pstmtIntraHq = null;
              ResultSet rsIntraFlow = null;
              Connection connIntraFlow = null;
              PreparedStatement pstmtIntraFlow = null;
              ResultSet rsEqNoAccess = null;
              Connection connEqNoAccess = null;
              PreparedStatement pstmtEqNoAccess = null;
              ResultSet rsAccessNoEq = null;
              Connection connAccessNoEq = null;
              PreparedStatement pstmtAccessNoEq = null;
              ResultSet rsFlowHqAccess = null;
              Connection connFlowHqAccess = null;
              PreparedStatement pstmtFlowHqAccess = null;
              dataList = new ArrayList();          
              dataFile = new ArrayList();
              System.out.println("At the begining :"+now() );
              dataFile = gestorFic.leerArchivo(path, file);
              System.out.println("After first step :"+now() );
              int size1 = dataFile.size();
              try {
                   connAccessNoEq = gestor.getConnection();
                   javaIntra = new ServiceProcessVO();
                   pstmtAccessNoEq = connAccessNoEq
                   .prepareStatement(ConsultasAssets.INTRA_ACCESS_NOEQ);
                             //ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
                   pstmtAccessNoEq.setString(1, oti);
                   pstmtAccessNoEq.setString(2, oti);
                   pstmtAccessNoEq.setString(3, oti);
                   rsAccessNoEq = pstmtAccessNoEq.executeQuery();
                   //int k = rsAccessNoEq.TYPE_SCROLL_SENSITIVE;
                   int i = 0;
                   //rsAccessNoEq.last();
                   while (rsAccessNoEq.next()) {
                        i++; System.out.println("Begin of loop:"+i);
                        javaIntra = populatedata(rsAccessNoEq, true);
                        dataList.add(javaIntra);
                        // Flow Hq Access
                        try {
                             connFlowHqAccess = gestor.getConnection();
                             javaIntra1 = new ServiceProcessVO();
                             pstmtFlowHqAccess = connFlowHqAccess
                             .prepareStatement(ConsultasAssets.HQ_ACCESS);
                             pstmtFlowHqAccess.setString(1, javaIntra
                                       .getCTASOCIACION().trim());
                             pstmtFlowHqAccess.setString(2, rsAccessNoEq.getString(1)
                                       .trim());
                             pstmtFlowHqAccess.setString(3, rsAccessNoEq.getString(3)
                                       .trim());
                             pstmtFlowHqAccess.setString(4,oti);
                             pstmtFlowHqAccess.setString(5,oti);
                             pstmtFlowHqAccess.setString(6,oti);
                             rsFlowHqAccess = pstmtFlowHqAccess.executeQuery();
                             while (rsFlowHqAccess.next()) {
                                  javaIntra1 = populatedata(rsFlowHqAccess, false);
                                  dataList.add(javaIntra1);
    //                         if(rsAccessNoEq.isAfterLast()){
    //                              return;
                        } catch (SQLException se) {
                             MCLA.logFatel(ClassNameAssets
                                       .getQualifiedClassName()
                                       + ": "
                                       + ClassNameAssets.getLineNumber()
                                       + ": "
                                       + "Error Occurred in HQ_ACCESS: "
                                       + se.getMessage());
                             throw new MigracionCommonExceptionAssets(se.getMessage());
                        } finally {
                             pstmtFlowHqAccess.close();
                             if (rsFlowHqAccess != null) {
                                  rsFlowHqAccess.close();
                             //gestor.releaseConn(connFlowHqAccess);
         private SPVOpopulatedata(ResultSet rsCpProcess, boolean modify)
         throws SQLException {
              SPVOjavaIntra = new ServiceProcessVO();
              if (rsCpProcess.getString(ConstantesAssets.NU) != null
                        && !rsCpProcess.getString(ConstantesAssets.NU)
                        .equalsIgnoreCase(ConstantesAssets.BLANK))
                   javaIntra.setNU(rsCpProcess.getString(
                             ConstantesAssets.NU).trim());
              if (rsCpProcess.getString(ConstantesAssets.NU_ASO) != null
                        && !rsCpProcess.getString(ConstantesAssets.NU_ASO)
                        .equalsIgnoreCase(ConstantesAssets.BLANK))
                   javaIntra.setNU_ASO(rsCpProcess.getString(
                             ConstantesAssets.NU_ASO).trim());
              // HashTable logic to increament value for CTASOCIACION Start
              if (modify == true) {
                   if (rsCpProcess.getString(ConstantesAssets.CTASOC) != null
                             && !rsCpProcess.getString(ConstantesAssets.CTASOC)
                             .equalsIgnoreCase(ConstantesAssets.BLANK)) {
                        char cha = ConstantesAssets.A;
                        if (tempMap.get(javaIntra.getNU()) != null) {
                             cha = tempMap.get(javaIntra.getNU()).toString()
                             .charAt(0);
                             cha++;
                        tempMap.put(javaIntra.getNU(), Character
                                  .toString(cha));
                        javaIntra.setCTASOCIACION(((rsCpProcess
                                  .getString(ConstantesAssets.CTASOC).trim()) + cha)
                                  .trim());
              } else {
                   javaIntra.setCTASOCIACION(rsCpProcess.getString(
                             ConstantesAssets.CTASOC).trim());
              // HashTable logic to increament value for CTASOCIACION End
              if (rsCpProcess.getString(ConstantesAssets.CCC) != null
                        && !rsCpProcess.getString(ConstantesAssets.CCC)
                        .equalsIgnoreCase(ConstantesAssets.BLANK))
                   javaIntra.setCCC(rsCpProcess.getString(
                             ConstantesAssets.CCC).trim());
              if (rsCpProcess.getString(ConstantesAssets.FIV1) != null
                        && !rsCpProcess.getString(ConstantesAssets.FIV1)
                        .equalsIgnoreCase(ConstantesAssets.BLANK))
                   javaIntra.setFIV(rsCpProcess.getString(
                             ConstantesAssets.FIV1).trim());
              if (rsCpProcess.getString(ConstantesAssets.FFV) != null
                        && !rsCpProcess.getString(ConstantesAssets.FFV)
                        .equalsIgnoreCase(ConstantesAssets.BLANK))
                   javaIntra.setFFV(rsCpProcess.getString(
                             ConstantesAssets.FFV).trim());
              if (rsCpProcess.getString(ConstantesAssets.ES) != null
                        && !rsCpProcess.getString(ConstantesAssets.ES)
                        .equalsIgnoreCase(ConstantesAssets.BLANK))
                   javaIntra.setES(rsCpProcess.getString(
                             ConstantesAssets.ES).trim());
              javaIntra.setI(ConstantesAssets.N);
              javaIntra.setN(ConstantesAssets.BLANK);
              javaIntra.setC(ConstantesAssets.BLANK);
              javaIntra.setCO(ConstantesAssets.BLANK);
              javaIntra.setFI(ConstantesAssets.BLANK);
              return javaIntra;
    Please see the code
    Siva

  • How do I change default Next/Previous buttons?

    When I automatically create multiple Submenus using the 'Create Chapter Index' command, Encore generates Next and Previous buttons.
    These are rather plain - they seem to be the same style regardless of the style of menu selected - and I'd like to set another default style.
    Can someone tell me how to do this, please?
    Many thanks
    John

    You can build the next/previous buttons any way you like. Just put them on the menu and then specify them as "Next" or "Previous" under the type field in the properties box. There's more information about this in the help files under chapter menu automation.

Maybe you are looking for

  • Mid 2010 Macbook Pro to a Samsung Tv. (Mode not supported)

    Hi, I have a macbook pro mid 2010, when connected to an external tv, i get the mirroring option, however when i uncheck the mirroring option (cause i need 2 desktops screen instead of one), my external monitor shows " Mode not supported ". I have a s

  • ITunes update problem leading to a Windows NTLDR error

    I also experienced the "MCVCR80.dll is missing" / "Error 7, Windows error 126" iTunes update error like almost everyone else.  I followed turingtest2's solution that has been posted in the countless threads on this problem (e.g. <a href="https://disc

  • Duplicated lines in PLD

    Hi All, Our customer's A/R invoices are copied from SO#. So for each line in A/R invoice, we can find a 'Base document key'. They would like to have the  'Base document key' of the first line in the A/R invoice in PLD header. That is ok. And they wou

  • Add Working Days Function

    All, I have created the following function to add working days to a date... create or replace function add_working_days( p_days in number, p_dt in date default trunc(sysdate) return date as v_weeks number; v_adj number; begin v_weeks := trunc(p_days/

  • How to delete iMessage archive

    Hello, I have used Messages on a work machine and it has synced all of my iMessage history from my iPhone (as it should have, and as I wanted). It's time for me to return this machine, and I'm trying to erase all of my chat history (the system user a