Start SQL-Update query on click

Hi,
I would like to start in a JSP am JSTL-Update when the user clicks on a button.
Unfortunately, I have not found any hint how to do that!
Can someone give me some advise how this can be done?
I have the following code:
<sql:setDataSource dataSource="jdbc:oracle:thin:@<IP-address>:1521:<SID>,oracle.jdbc.driver.OracleDriver,<user>,<password>" var="datasource1"/>
<sql:update var="insert1" sql="insert into table (column1,column2,column3,column4) select sysdate,column1,column2,column3 from <table2>" dataSource="${datasource1}"/>
But I have no idea how to associate it with the click on a button.
Best regards.

What proportion of each column has a -1 value?
Will the -1 value be in only one of the columns for each row or could there be multiple -1 values in a row?
How big is the table?
If only a small portion has a -1 and only one column per row could have -1, then seperate updates might be more efficient since only the columns that require updating will be touched. On the other hand, if several columns in a row could have -1 or if most rows would have at least one column with a -1, a single update might be more efficient since each row that requires multiple updates would only be touched once.
John

Similar Messages

  • SQL Update Query not Working...

      This was working until we had to encrypt the main key.  This has been replaced with an existing autonum field.  When I test the T-SQL query alone on SQL Server,  it works.   But through the ColdFusion progam, nothing happens.  Its as if the submit button reference to this is not working or is ignored.
    Any ideas?
    Here is the code clip were the issue may be occuring.
    <cfparam name="URL.SEQNO" default="1">
    <cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
    <cfif IsDefined("FORM.MM_UpdateRecord") AND FORM.MM_UpdateRecord EQ "formUpdateRecord">
      <cfquery name="Section301MI" datasource="301dsn">
      DECLARE @str NVARCHAR(128)
      SET @str = #FORM.SSN#;
      OPEN SYMMETRIC KEY SSN_Key_01
       DECRYPTION BY CERTIFICATE anjalitest
      UPDATE dbo.TableDataRecords SET SSN=
      <cfif IsDefined("FORM.SSN") AND #FORM.SSN# NEQ "">
        EncryptByKey(Key_GUID('SSN_Key_01'),@str)
          <cfelse>
          NULL
      </cfif>
      , verifySSN =
      <cfif IsDefined("FORM.SSN") AND #FORM.SSN# NEQ "">
        EncryptByKey(Key_GUID('SSN_Key_01'),@str)
          <cfelse>
          NULL
      </cfif>
      , LastName=
      <cfif IsDefined("FORM.LastName") AND #FORM.LastName# NEQ "">
        '#FORM.LastName#'
          <cfelse>
          NULL
      </cfif>
      , FirstName=
      <cfif IsDefined("FORM.FirstName") AND #FORM.FirstName# NEQ "">
        '#FORM.FirstName#'
          <cfelse>
          NULL
      </cfif>
      , MiddleInitial=
      <cfif IsDefined("FORM.MiddleInitial") AND #FORM.MiddleInitial# NEQ "">
        '#FORM.MiddleInitial#'
          <cfelse>
          NULL
      </cfif>
      , DOB=
      <cfif IsDefined("FORM.DOB") AND #FORM.DOB# NEQ "">
        '#FORM.DOB#'
          <cfelse>
          NULL
      </cfif>
      , BenefitProgram=
      <cfif IsDefined("FORM.BenefitProgram") AND #FORM.BenefitProgram# NEQ "">
        #FORM.BenefitProgram#
          <cfelse>
          NULL
      </cfif>
      , MedCessDate=
      <cfif IsDefined("FORM.MedCessDate") AND #FORM.MedCessDate# NEQ "">
        '#FORM.MedCessDate#'
          <cfelse>
          NULL
      </cfif>
      , ProgramDecision=
      <cfif IsDefined("FORM.ProgramDecision") AND #FORM.ProgramDecision# NEQ "">
        #FORM.ProgramDecision#
          <cfelse>
          NULL
      </cfif>
      , ProgramDecisionDate=
      <cfif IsDefined("FORM.ProgramDecisionDate") AND #FORM.ProgramDecisionDate# NEQ "">
        '#FORM.ProgramDecisionDate#'
          <cfelse>
          NULL
      </cfif>
      , ProgramType=
      <cfif IsDefined("FORM.ProgramType") AND #FORM.ProgramType# NEQ "">
        #FORM.ProgramType#
          <cfelse>
          NULL
      </cfif>
      , ProgAllowStartDate=
      <cfif IsDefined("FORM.ProgAllowStartDate") AND #FORM.ProgAllowStartDate# NEQ "">
        '#FORM.ProgAllowStartDate#'
          <cfelse>
          NULL
      </cfif>
      , ProgAllowCompDate=
      <cfif IsDefined("FORM.ProgAllowCompDate") AND #FORM.ProgAllowCompDate# NEQ "">
        '#FORM.ProgAllowCompDate#'
          <cfelse>
          NULL
      </cfif>
      , DiaryDate=
      <cfif IsDefined("FORM.DiaryDate") AND #FORM.DiaryDate# NEQ "">
        '#FORM.DiaryDate#'
          <cfelse>
          NULL
      </cfif>
      , DenialReason=
      <cfif IsDefined("FORM.DenialReason") AND #FORM.DenialReason# NEQ "">
        #FORM.DenialReason#
          <cfelse>
          NULL
      </cfif>
      , TermDecisionDate=
      <cfif IsDefined("FORM.TermDecisionDate") AND #FORM.TermDecisionDate# NEQ "">
        '#FORM.TermDecisionDate#'
          <cfelse>
          NULL
      </cfif>
      , TermReason=
      <cfif IsDefined("FORM.TermReason") AND #FORM.TermReason# NEQ "">
        #FORM.TermReason#
          <cfelse>
          NULL
      </cfif>
      , Remarks=
      <cfif IsDefined("FORM.Remarks") AND #FORM.Remarks# NEQ "">
        '#FORM.Remarks#'
          <cfelse>
          NULL
      </cfif>
      , EncryptNatIDNum1 = NULL
      , EncryptNatIDNum2 = NULL
      WHERE SEQNO=#URL.SEQNO#
       CLOSE SYMMETRIC KEY SSN_Key_01;
      </cfquery>
      <cflocation url="modifysuccess.cfm">
    </cfif>

    1) This is almost a clone to the Insert form that works.  The main differences are It selects the matching record for editing and then Updates.
    2) The CFDUMP gives me results when I put it in the logic section that responds to the Form Submit button.  But not at the top of the code.
      I added the CFABORT so I could see a result.
    <cfif (IsDefined("FORM.MM_UpdateRecord") AND FORM.MM_UpdateRecord EQ "formUpdateRecord") OR (IsDefined("FORM.UpdateRecord") AND FORM.UpdateRecord EQ "Update Record")>
       <cfdump var="#form#">
      <cfquery name="Section301MI" datasource="301dsn" username="section301db" password="testdb">
      DECLARE @str NVARCHAR(128)
      <cfif IsDefined("FORM.SSN")>
       SET @str = #FORM.SSN#;
      </cfif>
      OPEN SYMMETRIC KEY SSN_Key_01
       DECRYPTION BY CERTIFICATE anjalitest
      UPDATE dbo.TableDataRecords SET verifySSN=                     <<This is only displayed, but not modified.  Should this even be in the update?
      <cfif IsDefined("FORM.SSN") AND #FORM.SSN# NEQ "">
        EncryptByKey(Key_GUID('SSN_Key_01'),@str)
          <cfelse>
          NULL
      </cfif>
      , [LastName]=
      <cfif IsDefined("FORM.LastName") AND #FORM.LastName# NEQ "">
        '#FORM.LastName#'
          <cfelse>
          NULL
      </cfif>
      , [FirstName]=
      <cfif IsDefined("FORM.FirstName") AND #FORM.FirstName# NEQ "">
        '#FORM.FirstName#'
          <cfelse>
          NULL
      </cfif>
      , MiddleInitial=
      <cfif IsDefined("FORM.MiddleInitial") AND #FORM.MiddleInitial# NEQ "">
        '#FORM.MiddleInitial#'
          <cfelse>
          NULL
      </cfif>
      , DOB=
      <cfif IsDefined("FORM.DOB") AND #FORM.DOB# NEQ "">
        '#FORM.DOB#'
          <cfelse>
          NULL
      </cfif>
      , BenefitProgram=
      <cfif IsDefined("FORM.BenefitProgram") AND #FORM.BenefitProgram# NEQ "">
        #FORM.BenefitProgram#
          <cfelse>
          NULL
      </cfif>
      , MedCessDate=
      <cfif IsDefined("FORM.MedCessDate") AND #FORM.MedCessDate# NEQ "">
        '#FORM.MedCessDate#'
          <cfelse>
          NULL
      </cfif>
      , ProgramDecision=
      <cfif IsDefined("FORM.ProgramDecision") AND #FORM.ProgramDecision# NEQ "">
        #FORM.ProgramDecision#
          <cfelse>
          NULL
      </cfif>
      , ProgramDecisionDate=
      <cfif IsDefined("FORM.ProgramDecisionDate") AND #FORM.ProgramDecisionDate# NEQ "">
        '#FORM.ProgramDecisionDate#'
          <cfelse>
          NULL
      </cfif>
      , ProgramType=
      <cfif IsDefined("FORM.ProgramType") AND #FORM.ProgramType# NEQ "">
        #FORM.ProgramType#
          <cfelse>
          NULL
      </cfif>
      , ProgAllowStartDate=
      <cfif IsDefined("FORM.ProgAllowStartDate") AND #FORM.ProgAllowStartDate# NEQ "">
        '#FORM.ProgAllowStartDate#'
          <cfelse>
          NULL
      </cfif>
      , ProgAllowCompDate=
      <cfif IsDefined("FORM.ProgAllowCompDate") AND #FORM.ProgAllowCompDate# NEQ "">
        '#FORM.ProgAllowCompDate#'
          <cfelse>
          NULL
      </cfif>
      , DiaryDate=
      <cfif IsDefined("FORM.DiaryDate") AND #FORM.DiaryDate# NEQ "">
        '#FORM.DiaryDate#'
          <cfelse>
          NULL
      </cfif>
      , DenialReason=
      <cfif IsDefined("FORM.DenialReason") AND #FORM.DenialReason# NEQ "">
        #FORM.DenialReason#
          <cfelse>
          NULL
      </cfif>
      , TermDecisionDate=
      <cfif IsDefined("FORM.TermDecisionDate") AND #FORM.TermDecisionDate# NEQ "">
        '#FORM.TermDecisionDate#'
          <cfelse>
          NULL
      </cfif>
      , TermReason=
      <cfif IsDefined("FORM.TermReason") AND #FORM.TermReason# NEQ "">
        #FORM.TermReason#
          <cfelse>
          NULL
      </cfif>
      , Remarks=
      <cfif IsDefined("FORM.Remarks") AND #FORM.Remarks# NEQ "">
        '#FORM.Remarks#'
          <cfelse>
          NULL
      </cfif>
      , EncryptNatIDNum1 = NULL
      , EncryptNatIDNum2 = NULL
      WHERE SEQNO=#URL.SEQNO#
       CLOSE SYMMETRIC KEY SSN_Key_01;
      </cfquery>
    <cfabort>
      <cflocation url="modifysuccess.cfm">
    </cfif>

  • Sql Update Query help!!!..

    Hi Guys,
    below is the table , i am trying to update error_flg of records which have ID=2, NAME ='janice' to 2 if the error_flg is '0' and to '3' if the error flag is '1',
    the bold are the records i want to update and i am also showing the result below in highlighted
    CREATE TABLE person
    ID NUMBER(12),
    person_ID NUMBER(16),
    NaME VARCHAR2(15 BYTE),
    USERID VARCHAR2(7 BYTE),
    error_flg VARCHAR2(1 BYTE)
    insert into person (id,person_id,name,userid,error_flg) values(1,100,'micheal','userid','1')
    insert into person (id,person_id,name,userid,error_flg) values(1,101,'steve','userid','1')
    insert into person(id,person_id,name,userid,error_flg) values(1,102,'janice','userid','1')
    insert into person (id,person_id,name,userid,error_flg) values(2,103,'janice','userid','1')
    insert into person (id,person_id,name,userid,error_flg) values(2,104,'janice','userid','0')
    insert into person (id,person_id,name,userid,error_flg) values(3,105,'janice','userid','0')
    result should be:
    insert into person (id,person_id,name,userid,error_flg) values(1,100,'micheal','userid','1')
    insert into person (id,person_id,name,userid,error_flg) values(1,101,'steve','userid','1')
    insert into person(id,person_id,name,userid,error_flg) values(1,102,'janice','userid','1')
    insert into person (id,person_id,name,userid,error_flg) values(2,103,'janice','userid','3')
    insert into person (id,person_id,name,userid,error_flg) values(2,104,'janice','userid','2')
    insert into person (id,person_id,name,userid,error_flg) values(3,105,'janice','userid','0')
    Edited by: oraclebeginner1231 on Jun 10, 2010 8:52 AM

    oraclebeginner1231 wrote:
    that was smart..why did i not think .. also how to combine both?
    thanks a lotYou can use a CASE statement to achieve that.
    update person
       set error_flg = case when error_flg = '0' then '2' when error_flg = '1' then '3' end
    where id    = 2
    and   name  = 'janice'
    and   error_flg in ('0', '1');

  • IPhoto does not start to update after my iMac was updated to OS X Yosemite.

    iPhoto has been "paused" after my iMac was updated to OS X Yosemite. iPhoto does not start to update when I click "UPDATE" in App Store "Updates". The circle on the left top corner just keep circling. Do you know how to fix this problem? I cannot download my photos to iPhoto without updating it.

    Thank you LarryHN,
    I could not follow what you have explained to me as I struggled to find iPhoto 9.6. Anyway, while I was struggling, I managed to update iPhoto somehow. Finally, I can use iPhoto!
    Thank you very much for your quick response.
    Tama Chan

  • SQL Update to split 1 column into 2

    I have a column in a table that holds both a city and a zip ex. Jackson 44319
    I am trying to write an sql update query so that the 2 pieces of info would be split and funneled into their own respective column. For example:
    Before
    column name: address
    Jackson 44319
    After
    column name:city                             column name: zip
    Jackson                                           44319
    Here is what I have come up with so far, but it does not work correctly.
    Update Table
    Set city=Parsename(Replace(address ,',','.'),2),
    zip=Parsename(Replace(address ,',','.'),1)
    this query basically copies all my info from the address table and puts it into the zip table, and the city table remains null. yet, nothing gets split.

    Does your db have a bulk loading utility?  Do you have access to text manipulation tools such as awk?
    If so, using them is probably a better idea than using ColdFusion.

  • Multiple SQL Update within Parent Query

    I am tring to extract an image from within a MS SQL image field,
    opening the image using JAI, getting the src.getWidth() & src.getHeight
    () of each item within the database, and then writing the width and
    height back into the database. Everything works except when I goto
    write the values into the database - the page (when loading) continues
    to work and work and work until I restart the tomcat service. I do not
    understand why this would occur, and what is even stranger - I have
    very similar code i used for resizing images in the database into a
    thumbnail - display and original file sizes using a similar approach...
    and that works with out a problem...
    I have tried the code with out the inner update query - it works. I
    tried with just the selection of a single specific item in the first
    query and that works, but when I try multiple updates the second query
    appears to stall.
    The code is as follows.:
    <%@ page language="java" import="javax.servlet.*,javax.servlet.http.*,java.io.*,java.util.*,java.sql.*,javax.media.jai.*,java.awt.*,java.awt.image.*,java.awt.Graphics.*,java.awt.geom.*,java.awt.image.renderable.*,javax.media.jai.widget.*,com.jspsmart.upload.*,java.net.*,com.sun.media.jai.codec.*"%>
    <jsp:useBean id="mySmartUpload" scope="page" class="com.jspsmart.upload.SmartUpload" />
    <%
         // Variables
         int count=0;
         int width                                             = 0;
         int height                                             = 0;
         String vFileName                                   = "";
         String vFileExt                                        = "";
         String vFileID                                        = "";
         String format                                        = "0";
         // Connect to the database
         Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
         Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://206.152.227.62:1433;DatabaseName=WWWBBD;User=wwwbbd;Password=bbd1412");
         //Create the statement
         Statement sqlGetPics                              = con.createStatement();
         Statement sqlUpdate                                   = con.createStatement();
         //build the query
         String qryGetPics                                   = "SELECT TOP 5 FileID, FileExt, FileName, AdjFile = CASE WHEN FullFile IS NULL THEN Display ELSE FullFile END FROM FileStore WHERE (UPPER(FileExt) = '.JPG' OR UPPER(FileExt) = '.TIF' OR UPPER(FileExt) = '.GIF' OR UPPER(FileExt) = '.BMP') AND (NOT Display IS NULL OR NOT FullFile IS NULL)";
         //execute the query
         ResultSet rsGetPics                                   = sqlGetPics.executeQuery(qryGetPics);
         // Initialization
         SmartUpload uploader                              = new SmartUpload();
         uploader.initialize(getServletConfig(),request,response);
         mySmartUpload.initialize(getServletConfig(), request, response);
         // Upload
         mySmartUpload.upload();
         while (rsGetPics.next()) {
              vFileID                                             = rsGetPics.getString("FileID");
              vFileExt                                        = rsGetPics.getString("FileExt");
              vFileName                                        = rsGetPics.getString("FileName") + vFileExt;
              width                                             = 0;
              height                                             = 0;
              uploader.fieldToFile(rsGetPics, "AdjFile", "/upload/" + vFileName);
              if (vFileExt.equalsIgnoreCase(".JPG") || vFileExt.equalsIgnoreCase(".JPEG"))
                   format                                        = "JPEG";
              else if (vFileExt.equalsIgnoreCase(".TIF") || vFileExt.equalsIgnoreCase(".TIFF"))
                   format                                        = "TIFF";
              else if (vFileExt.equalsIgnoreCase(".GIF"))
                   format                                        = "JPEG";
              else if (vFileExt.equalsIgnoreCase(".BMP"))
                   format                                        = "BMP";
              else
                   format                                        = "0";
              // update the width & height
              if (format != "0")
                   try
                        //Opens the image
                        RenderedImage src                    = JAI.create("fileload","d:\\servers\\tomcat\\webapps\\jsp\\upload\\" + vFileName);
                        width                                   = src.getWidth();
                        height                                   = src.getHeight();
                        java.io.File imageFile               = new java.io.File("d:\\servers\\tomcat\\webapps\\jsp\\upload\\" + vFileName);
                        InputStream is                         = new FileInputStream(imageFile);
                        //build the query
                        String qryUpdate                    = "UPDATE FileStore SET Width = " + width + ", Height = " + height + " WHERE FileID = " + vFileID;
                        //execute the query
                        ResultSet rsUpdate                    = sqlUpdate.executeQuery(qryUpdate);
                        %>[<%=width%>x<%=height%>:<%=vFileID%>:<%=qryUpdate%>]<BR><%
                   catch(Exception e)
                        {out.println("An error occurs : " + e.toString());}               
              count++;          
         //rsUpdate.close();
         sqlUpdate.close();
    %>
    <HTML>
    <HEAD>
         <TITLE>Repair Files</TITLE>
    </HEAD>
    <BODY>
    <%=count%> files updated in the database.
    </BODY>
    </HTML>

    BTW - I also tried this with a prepared statment query... no good.

  • TS1702 I have an app that appears to need to be updated. I clicked to update three days ago. It has started to update and will not finish. How can I delete the app while its in the middle of updating?

    IPhone 5
    I have an app that appeared to need to be updated. I clicked to update three days ago. It has started to update and will not finish. How can I delete the app while its in the middle of updating?

    Locked on an update can mean a couple of different things. So there are a number of things to try, but start with these.
    If you have a "waiting" icon, try tapping on the icon and see if you can pause the update/download. Of it pauses, tap on it again and see if it will resume.
    Try holding down on the icon until all of the icons on the screen wiggle. If the X to delete pops up on the waiting/stalled app -  tap the X to delete the app. Tao,the home button and the apps will stop wiggling.
    You can also try this and see if the downloads will resume. Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.

  • Rewrite update query to improve performance - sql attached

    Hi ,
    The following query(pasted below) is taking 4 hours to compelete, table ef is having 10 crore records, and I have 3 binary indexes defined on ef on columns as_at_date, cc and fid (these are individual indexes), just want to know if there is any better way to write the query?
    Many thanks
    Rahul
    SQL :
    update ef emp
    set emp.b2r = (
    select e.b2r
    from ef e
    where e.as_at_date  = (select max(as_at_date) from ef where b2r is not null)
    and e.b2r is not null
    and emp.fid = e.fid
    and emp.cc = e.cc
    where substr(emp.as_at_date,1,6) >= (select substr(max(fk_reporting_date_id),1,6) from f_c_f)
    and exists (
    select e.b2r
    from ef e
    where e.as_at_date = (select max(as_at_date) from ef where b2r is not null)
    and e.b2r is not null
    and emp.fid=e.fid
    and emp.cc=e.cc

    > which column uniquely identifies every row : UNKNOW to me(really sorry)
    This is a very critical piece of information. UNKNOWN is a very wrong answer. You need to know such things before keeping your hands on keyboard.
    Any way based on your update statement you can convert it into merge statement like this
    merge into ef a
    using (
             select b2r
                  , fid
                  , cc
               from (
                       select b2r
                            , fid
                            , cc
                            , row_number() over
                                             partition by fid
                                                        , cc
                                                 order by decode(b2r, null, null, as_at_date)
                                                     desc nulls last
                                           ) rno
                         from ef
              where rno = 1
          ) b
       on (
              a.fid = b.fid and
              a.cc  = b.cc  and
              ubstr(a.as_at_date,1,6) >= (select substr(max(fk_reporting_date_id),1,6) from f_c_f)
    when matched then
    update set a.b2r = b.b2r;
    Note: The code is untested
    This scans your EF table lesser number of time. As you are in 11g you can try using DBMS_PARALLEL_EXECUTE to speed up your SQL.

  • Update query in sql taking more time

    Hi
    I am running an update query which takeing more time any help to run this fast.
    update arm538e_tmp t
    set t.qtr5 =(select (sum(nvl(m.net_sales_value,0))/1000) from mnthly_sales_actvty m
    where m.vndr#=t.vndr#
    and m.cust_type_cd=t.cust_type
    and m.cust_type_cd<>13
    and m.yymm between 201301 and 201303
    group by m.vndr#,m.cust_type_cd;
    help will be appreciable
    thank you

    This is the Reports forum. Ask this in the SQL and PL/SQL forum.

  • Query on SQL UPDATE

    Hi,
    A small query regarding the SQL Update......
    I have the below table values where I want to update two columns.....
    EmpID EmpName Sal DocID DocSeqNum CreaDate
    ========================================
    1 XYZ 25 289 1 12-MAY-2012
    2 XYZ1 50 289 2 12-MAY-2012
    3 XYZ2 55 NULL NULL 14-MAY-2012
    4 XYZ3 60 NULL NULL 14-MAY-2012
    5 XYZ4 65 NULL NULL 14-MAY-2012
    6 XYZ5 70 NULL NULL 13-MAY-2012
    I want to update the DocID with value 289 and DocSeqNum with a sequence i.e 3, 4, 5, 6 etc.....
    Please advise.
    THanks

    Maybe just (for this particular case)
    update the_table
       set docid = 289,
           docseqnum = empid
    where coalesce(docid,docseqnum) is nullor
    merge into the_table t
    using (select empid,289 sal,row_number() over (order by empname) docid
             from the_table
          ) u
       on (t.empid = u.empid)
    when matched
    then update
            set t.sal = u.sal,
                t.docid = u.docid
          where coalesce(docid,docseqnum) is nullRegards
    Etbin

  • Update Query Runs On

    I have a simple index page that lists a set of records, each
    having an anchor tag, which when clicked opens a detail page
    providing details of that record. The detail page for the record
    provides for the update of any content that is changed on the form.
    Everything appears to run fine when the update button is clicked -
    and the database updates. Now if I return to to the index page
    after the update I find that the page properly refreshes and data
    may, or may not appear in light of the changes just made on the
    update page and because of the filter that is part of the SQL of
    the index page query. However, even though the page is propery
    refreshed the status bar on the bottom of the browser indicates
    that some sort of query activity is going on as evidenced by the
    painting of a left-to-right series of blue squares. Although this
    circumstance does not appear to inhibit the updating of records -
    the status bar activity is a concern. I surmise that the update
    process is not quite wrapped up. Any comments you might have about
    this scenario and a possible solution would be appreciated.
    Thanks!

    Although this circumstance does not appear to inhibit the
    updating of
    records - the status bar activity is a concern. I surmise
    that the
    update process is not quite wrapped up.
    Nope that status bar has nothing to do with and no knowledge
    of the
    update process. It is the browser waiting on the current page
    to finish
    processing, and the way you have describe your system, the
    update has
    completed before this page was even started.

  • Update query not working from edit page

    Next incident with the guestbook saga:
    Successful execution of gb_entry_mstr_det_e.cfm with URL:
    http://www.benoitsystems.com/ww/bd/gb/gb_entry_mstr_det_e.cfm?call_number=14 all have database current info...this is good, but:
    textboxes
    Problem 1:
    the SELECT field does not does not reflect/display the correct option I know exists in the database
    the database field whence this SELECT object is supposed to display is a number, not text.
    now,...
    Problem 2:
    Clicked on "Update Your Entry" button at bottom of edit page (to update by going to gb_confirm_update.cfm)
    <INPUT
    TYPE="submit"
    NAME="submit"
    VALUE="Update Your Entry">
    then, arriving at the gb_confirm_update.cfm page, ...
    Got an error (below) executing the page: gb_confirm_update.cfm with resulting URL:
    http://www.benoitsystems.com/ww/bd/gb/gb_confirm_update.cfm?call_number=#gb_entryID#
    --- snippet from template gb_confirm_update.cfm
    <CFQUERY DATASOURCE="9130.ww" NAME="ww_gb_ud">
    UPDATE gb_entries
    SET
    gb_entry_stts_='form.gb_entry_stts_',
    gb_entry_nm_f='form.gb_entry_nm_f',
    gb_entry_nm_l='form.gb_entry_nm_l',
    gb_entry_nm_l_dspl_x=form.gb_entry_nm_l_dspl_x,
    gb_entry_tce='form.gb_entry_tce',
    gb_entry_tce_dspl_x=form.gb_entry_tce_dspl_x,
    gb_entry_cy='form.gb_entry_cy',
    gb_entry_stt='form.gb_entry_stt',
    gb_entry_instr='form.gb_entry_instr',
    gb_entry_m='form.gb_entry_m',
    gb_entry_del_x=form.gb_entry_del_x
    WHERE gb_entryID=form.gb_entryID
    </CFQUERY>
    --- end snippet ---
    =================================================
    Error Executing Database Query. 
    [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 4. 
    The error occurred in E:\benoitsystems.com\wwwroot\ww\bd\gb\gb_confirm_update.cfm: line 2
    1 : <!--- <CFUPDATE DATASOURCE="9130.ww" TABLENAME="gb_entries"> --->
    2 : <CFQUERY DATASOURCE="9130.ww" NAME="ww_gb_ud">
    3 : UPDATE gb_entries
    4 : SET
    SQL    UPDATE gb_entries SET gb_entry_stts_='form.gb_entry_stts_', gb_entry_nm_f='form.gb_entry_nm_f', gb_entry_nm_l='form.gb_entry_nm_l', gb_entry_nm_l_dspl_x=form.gb_entry_nm_l_dspl_x, gb_entry_tce='form.gb_entry_tce', gb_entry_tce_dspl_x=form.gb_entry_tce_dspl_x, gb_entry_cy='form.gb_entry_cy', gb_entry_stt='form.gb_entry_stt', gb_entry_instr='form.gb_entry_instr', gb_entry_m='form.gb_entry_m', gb_entry_del_x=form.gb_entry_del_x WHERE gb_entryID=form.gb_entryID 
    DATASOURCE   9130.ww
    VENDORERRORCODE   -3010
    SQLSTATE   07002
    Please try the following:
    Check the ColdFusion documentation to verify that you are using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.
    Browser   Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
    Remote Address   71.233.234.226
    Referrer   http://www.benoitsystems.com/ww/bd/gb/gb_entry_mstr_det_e.cfm?call_number=14
    Date/Time   21-Jul-10 03:11 PM
    =================================================
    I have every NAME of each object matching, verbatum, in the UPDATE query, and every database field name correct in teh query also.

    I was encouraged to send snippets in an another submission, and now I believe it is best that I  "lay my cards on the table"
    Here's my hand:
    Pages in question for your review:
    http://www.benoitsystems.com/ww/bd/gb/gb_mstr.cfm  click on the pencil (the toilet will delete the record.
    http://www.benoitsystems.com/ww/bd/gb/gb_entry_mstr_det_e.cfm?call_number=21  go to bottom of webpage and click “Update Your Entry”
    http://www.benoitsystems.com/ww/bd/gb/gb_confirm_update.cfm?call_number=#gb_entryID#
    In your review of the above (should you choose) before clicking on the pencil, look at the status on the master listing record you will be editing, and feel free to edit.  Most statuses will be “Hold”
    Two dummy MS Access database tables:
    Table 1: "gb_entries" (Guestbook)
    field 1: gb_entries_ID (Autonumber - Long Integer)
    field 2: gb_entries_dt (date/time)
    field 3: gb_entries_nm_f (Text)
    field 4: gb_entries_nm_l (Text)
    field 5: gb_entries_nm_stts_ (Number field - Byte (not bit)) (fed by gb_sttsID)
    couple other text fields
    field 6: gb_entries_em (Text)
    field 7: gb_entries_cy (Text)
    field 8: gb_entries_stt (Text)
    field 9: gb_entries_nm_l_dspl (Yes/No or True/False)
    field 10: gb_entries_m (Memo type)
    Table 2: "gb_stts_rf" (Guestbook Status Reference)
    field 1: gb_sttsID (Autonumber - Long Integer)
    field 2: gb_stts (Text)
    Two Templates:
    This is the edit page (where a person with administrative access may edit the status or change the spelling for someone, etc.):
    <!--- This query fills the form with the chosen record data (except for the darned SELECT object) ---> <CFQUERY NAME="edit_entry" DATASOURCE="9130.ww"> SELECT * FROM gb_entries WHERE #call_number#=gb_entryID </CFQUERY>
    <!--- This query is for the select dropdown of guestbook status options (set to default on “Hold” from gb_nw.cfm) ---> <CFQUERY NAME="q_stts" DATASOURCE="9130.ww"> SELECT * FROM gb_stts_rf </CFQUERY>
    <HTML>
    <HEAD>
    <TITLE>Woodwindology Guestbook Entry Edit Page</TITLE> <CFOUTPUT QUERY="incl_css_bd">#incl_code#</CFOUTPUT>
    </HEAD>
    <BODY
          BGPROPERTIES="fixed">
    <DIV ALIGN="center">
    <IMG
          SRC="<CFOUTPUT>#baseurl#</CFOUTPUT>md/img/ut/ttl/pg/guestbook.gif"
          BORDER="0">
    <BR>
    <IMG
          SRC="<CFOUTPUT>#baseurl#</CFOUTPUT>md/img/ut/ttl/sub/edit_entry.gif"
          BORDER="0">
    <BR>
    Developer View
    </DIV>
    <TABLE>
          <TR>
                <TD>
                      <TABLE
                            WIDTH="100%"
                            BORDER="0"
                            CELLPADDING="5"
                            CELLSPACING="0">
          <TR>
                <TD VALIGN="top">
                      <FORM
                            NAME="f_gb_entry_mstr"
                            ACTION="gb_confirm_update.cfm?call_number=#gb_entryID#"
                            METHOD="post">
                      <CFOUTPUT QUERY="edit_entry">
                      <B>Entry ID:</B>
                      #gb_entryID#     
                      <INPUT
                            TYPE="hidden"
                            NAME="gb_entryID"
                            VALUE="#gb_entryID#">
                      <P>
                      <B>Entry Date and Time:</B>
                      #DateFormat("#gb_entry_dt#","mmmm d, yyyy")# #TimeFormat("#gb_entry_dt#","h:mm tt")#
    <P>
                      <B>Entry Status:</B>
                      <SELECT
                            NAME="gb_entry_stts_"
                            VALUE="#gb_entry_stts_#">
    </CFOUTPUT>
                            <CFOUTPUT QUERY="q_stts">
                                  <OPTION VALUE="#gb_sttsID#">#gb_stts#</OPTION>
                            </CFOUTPUT>
                      </SELECT>
                      <P>
    <CFOUTPUT QUERY="edit_entry">
                      <B>Guest's First Name:</B>
                      <INPUT
                            TYPE="text"
                            NAME="gb_entry_nm_f"
                            VALUE="#gb_entry_nm_f#">
                      <P>
                      <B>Guest's Last Name:</B>
                      <INPUT
                            TYPE="text"
                            NAME="gb_entry_nm_l"
                            VALUE="#gb_entry_nm_l#">
                      <BR>
                      Display Last Name:
                      <INPUT
                            TYPE="radio"
                            NAME="gb_entry_nm_l_dspl_x"
                            VALUE="Yes">
                      Do Not Display Last Name:
                      <INPUT
                            TYPE="radio"
                            NAME="gb_entry_nm_l_dspl_x"
                            VALUE="no">
                            <P>
                            <B>Your Email Address:</B><BR>
                            <INPUT
                                  TYPE="text"
                                  NAME="gb_entry_tce"
                                  VALUE="#gb_entry_tce#"
                                  SIZE="40"
                                  MAXLENGTH="40">
                      <BR>
                      Uncheck the box to keep email private:
                      <INPUT
                            TYPE="checkbox"
                            NAME="gb_entry_tce_dspl_x"
                            VALUE="#gb_entry_tce_dspl_x#">
                      <P>
                      <SPAN CLASS="emph01">*</SPAN> Your City:
                      <INPUT
                            TYPE="text"
                            NAME="gb_entry_cy"
                            VALUE="#gb_entry_cy#"
                            SIZE="30">
                      <P>
                      <SPAN CLASS="emph01">*</SPAN> Your State:
                      <INPUT
                            TYPE="text"
                            NAME="gb_entry_stt"
                            VALUE="#gb_entry_stt#"
                            SIZE="30">
                      <BR>
                            <B>Instruments Played:</B>
                      <BR>
                            <TEXTAREA
                                  COLS="45"
                                  MAX="50"

  • UPDATE QUERY can't update table

    Hi,
    During 1500-2000 concurrent users, DB Transaction locks occur. So that Update query can't update table and we get inconsistent data. How can we avoid this inconsistent data?? Why we get transaction locks??
    Eg. In update query it update the status of user with completed; but because of transaction lock  update query can't update status of user it remains uncompleted. So we can get wrong status of user(inconsistent data). Why UPDATE query update the status
    of user???
    update table set status='completed', date=@p2,score=@p3 where id=@p1

    You are not getting inconsistent data, you are getting the data according to the isolation level you are running under. The isolation level determines the locking model and therefore determines any bad dependencies you may experience. Reducing the bad dependencies
    through higher isolation level will lower concurrency. *This* is the core concept of Transactional Processing theory.
    Furthermore there is not really such a thing as a DB Transaction lock - at least not in the way you mean. SQL server does use DB locks (such as Shared transaction workspace and Exclusive transaction workspace) but the highest level of lock escalation is
    the object level (heap or btree) so those are the things you are really interested in. In the ideal would you want all Exclusive, Shared and U locks to be taken at the RID (heaps) or Key (cluster tables) level - and only have few of them per query.
    In conclusion think carefully about your query and how it is implimented under the covers by the database engine.
    Regards,
    Mark Broadbent.
    Microsoft Certified Master
    Contact me through twitter |
    blog | sqlcloud
    Please click "Propose as answer" if a post solves your problem
    or/and vote the post up if it's been helpful.

  • Update query is waiting for async descriptor resize

    Hi All,
    One of the update query which was completing in 1-2 mins. Suddenly today it started taking more than 3-4 hours and still it is running.
    Below is the query, I can see the explain plain. I can see the query is waiting for async descriptor resize wait event
    UPDATE AP_INVOICE_DISTRIBUTIONS SET POSTED_FLAG = 'N' WHERE POST
    ED_FLAG = 'S' AND (ACCOUNTING_DATE >= :B2 OR :B2 IS NULL) AND (A
    CCOUNTING_DATE <= :B1 OR :B1 IS NULL)
    when i checked the P1text, P2text columns of v$session, it is showing outstanding #aio,current ai0 limit respectively.
    Explan plan
    CODEPLAN_TABLE_OUTPUT
    | Id  | Operation                      | Name                         | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | UPDATE STATEMENT               |                              |       |       |   250 (100)|          |
    |   1 |  UPDATE                        | AP_INVOICE_DISTRIBUTIONS_ALL |       |       |            |          |
    |   2 |   NESTED LOOPS                 |                              |       |       |            |          |
    |   3 |    NESTED LOOPS                |                              |    39 | 12480 |   250   (0)| 05:14:02 |
    |*  4 |     TABLE ACCESS BY INDEX ROWID| AP_ACCOUNTING_EVENTS_ALL     |    39 |   624 |   145   (0)| 03:02:09 |
    |*  5 |      INDEX RANGE SCAN          | AP_ACCOUNTING_EVENTS_N2      |  3954 |       |    14   (0)| 00:17:36 |
    |*  6 |     INDEX RANGE SCAN           | AP_INVOICE_DISTRIBUTIONS_N18 |     4 |       |     2   (0)| 00:02:31 |
    PLAN_TABLE_OUTPUT
    |*  7 |    TABLE ACCESS BY INDEX ROWID | AP_INVOICE_DISTRIBUTIONS_ALL |     1 |   304 |     4   (0)| 00:05:02 |
    CODE
    Please help me on this.
    Env Details --
    DB version -- 11.2.0.1
    OS - IBM AIX.
    Thanks in advance...

    This could be this bug
    Bug 9829397 - Excessive CPU and many "asynch descriptor resize" waits for SQL using Async IO (Doc ID 9829397.8)

  • Update query with prompt to input percentage

    Hi I'm just starting out with Access I need to do an update query with a prompt asking the user to enter a percentage this what i have done "ProdSellPrice+ProdSellPrice *[Enter a Percentage] and I've all so done this "[ProdSellPrice]+[ProdSellPrice]
    *[Enter a Percentage]" but still not working.

    The expression to add a percentage to a value is v*(1+(p/100)) where v is the value and p is the percentage. e.g. in the debug window:
    v = 52
    p= 10
    ? v *(1+(p/100))
     57.2
    So the SQL statement would be:
    UPDATE  tblProduct
    SET ProdSellPrice = ProdSellPrice * (1+([Enter a Percentage]/100));
    Ken Sheridan, Stafford, England

Maybe you are looking for

  • Footer & Text Link Issue

    Http://Infinite8imaging.com On some pages the green footer bar i created is being forced off the page (pushed down), I am not sure why. it doesnt look like his in preview mode or when i "preview page in browser", only ater i export to html and upload

  • Updating an Integration Process in Builder after making a change in Design

    Hi, I have a BPM defined as an Integration Process in Designer. I transferred the Integration Process from Repository to the Builder. Now I have updated my BPM Process in Designer/Repository but the "new" outbound and inbound interfaces do not seem t

  • 3G nano cuts to menu during movie playback...

    Guys, Whilst watching a movie on my iPod nano, it frequently just cuts out and returns back to the menu without holding the position of where it was last at... very annoying... I'm up to date with all the latest software downloads, so I'm struggling

  • Unable to open camera

    My camera and video record does not work at all. I am unable to take picture when ever I click on the track ball I reveive the error message "Could not start the camera. Close other applications and try opening the camera again" I call the Rogers the

  • Refine Edge Problem

    After doing some google searches, I've decided to bring the question a new.  I am using Adobe CS5 on Windows Vista (32-bit).  My refine edge tool has stopped working properly.  Rather than refining my edge selection, it sort of blends my selection in