How to commit?

Hi there,
I have 3 operations in a function, do I need commit three times or only one time like below?
TIA
Wolf
=================================================================================
          con.setAutoCommit(false);
          String insertStatement = "Insert into dayhistory (s_code, d_code, date, starttime, endtime) select inservice.s_code, inservice.d_code, inservice.date, inservice.starttime, addtime(inservice.starttime,\"1:0:0\") from inservice where hour(timediff("+mt+",starttime))>=1";
          String updateStatement = "update computer set status = 0 where s_code in (select s_code from inservice where hour(timediff("+mt+",starttime))>=1)";
          String deleteStatement = "DELETE FROM inservice where hour(timediff(+"+mt+",starttime))>=1";
          PreparedStatement insertStmt = con.prepareStatement(insertStatement);
          insertStmt.executeUpdate();
          insertStmt.close();
          PreparedStatement updateStmt = con.prepareStatement(updateStatement);
          updateStmt.executeUpdate();
          updateStmt.close();
          PreparedStatement deleteStmt = con.prepareStatement(deleteStatement);
          deleteStmt.executeUpdate();
          deleteStmt.close();
          con.commit();
          con.setAutoCommit(true);

con.setAutocommit(false);
try{
sql stmt1
sql stmt2 ... et etc
(bunch of sql executions)
catch(SQLException e){
con.rollback();
con.commit();
con.setAutoCOmmit(true);Wouldn't you want to put the commit inside the try catch block. What happens when an exception is thrown, the roll back is called and then the commint is called?
Also I believe that the roolback can throw an exception, so you may want to wrap that line in a seperate try catch block.

Similar Messages

  • How to Commit before Insert Row when Press Create Insert Button ?

    Hi all;
    I'm Using JDev 11.1.1.2.0
    How to Commit before Insert Row when Press Create Insert Button in ADF11g?
    <af:commandButton actionListener="#{bindings.CreateInsert.execute}"
    text="CreateInsert"
    disabled="#{!bindings.CreateInsert.enabled}"
    id="cb8" />
    best regards;

    You need to do a custom method eather in managed bean or in Application module to do that.
    in managed bean it would be something like:
    public void CommitAndInsert(ActionEvent actionEvent) {
    OperationBinding opCommit = ADFUtils.findOperation("Commit");
    opCommit.execute();
    OperationBinding opCreateInsert = ADFUtils.findOperation("CreateInsert");
    opCreateInsert.execute();
    In page bindings Commit and CreateInsert must exist
    then the button actionListener will be
    <af:commandButton actionListener="#{backing.CommitAndInsert}"

  • How to commit each record in Oracle Form Personalization

    Hi,
    how to commit each record with out using save button in form...my requirement is when cursor goes to next record it vil automatically stored in database please give me your valuable suggestion...
    Actual Requirement:
    here we need to give the locators(it is  number) whenever the cursor goes to next record it vil automatically incremented by 1(i wrote query for incremetation) and previous one vil be stored in database.
    Here i am using WHEN NEW ITEM INSTANCE IS USED Trigger..
    Thank You,
    Regards,
    Putta

    Hi,
    The commit should be done by the form, or whatever raises the business event.
    The API fires the event in the same transaction (unless the subscription is deferred), and then the commit is issued. This commits the transaction, and all actions of the event subscription.
    If the subscription is deferred, then the concurrent request which processes the subscription will issue the commit on completion.
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://thoughts.workflowfaq.com ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • How to commit Domains?

    How to commit Domains?

    Hi Philip!
    Yes, I need to commit design with domains to SVN repository. By default, domains is not commited and if I check-out my design from repository on another machine, there's no info about used domains in design.

  • How to Commit table by writting Java code in Managed Bean?

    Hi,
    Can anyone suggest me how to Commit table by writing Java code in Managed Bean?.
    I want to commit table manually after modifying in UI.
    Please suggest me guys.
    Thanks,
    Ramit Mathur

    Hi Friend Copy this two java files with same package of your bean package.
    1,*ADFUtils.java*
    package org.calwin.common.view.utils;(Your package name)
    import java.util.ArrayList;
    import java.util.List;
    import javax.el.ELContext;
    import javax.el.ExpressionFactory;
    import javax.el.MethodExpression;
    import javax.el.ValueExpression;
    import javax.faces.context.FacesContext;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.model.binding.DCParameter;
    import oracle.adf.share.logging.ADFLogger;
    import oracle.binding.AttributeBinding;
    import oracle.binding.BindingContainer;
    import oracle.binding.ControlBinding;
    import oracle.binding.OperationBinding;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.uicli.binding.JUCtrlValueBinding;
    * A series of convenience functions for dealing with ADF Bindings.
    * Note: Updated for JDeveloper 11
    * @author Duncan Mills
    * @author Steve Muench
    * $Id: ADFUtils.java 2513 2007-09-20 20:39:13Z ralsmith $.
    public class ADFUtils
    public static final ADFLogger _LOGGER = ADFLogger.createADFLogger(ADFUtils.class);
    * Get application module for an application module data control by name.
    * @param pName application module data control name
    * @return ApplicationModule
    public static ApplicationModule getApplicationModuleForDataControl(String pName)
    return (ApplicationModule) JSFUtils.resolveExpression("#{data." + pName + ".dataProvider}");
    * A convenience method for getting the value of a bound attribute in the
    * current page context programatically.
    * @param pAttributeName of the bound value in the pageDef
    * @return value of the attribute
    public static Object getBoundAttributeValue(String pAttributeName)
    return findControlBinding(pAttributeName).getInputValue();
    * A convenience method for setting the value of a bound attribute in the
    * context of the current page.
    * @param pAttributeName of the bound value in the pageDef
    * @param pValue to set
    public static void setBoundAttributeValue(String pAttributeName, Object pValue)
    findControlBinding(pAttributeName).setInputValue(pValue);
    * Returns the evaluated value of a pageDef parameter.
    * @param pPageDefName reference to the page definition file of the page with the parameter
    * @param pParameterName name of the pagedef parameter
    * @return evaluated value of the parameter as a String
    public static Object getPageDefParameterValue(String pPageDefName, String pParameterName)
    BindingContainer bindings = findBindingContainer(pPageDefName);
    DCParameter param = ((DCBindingContainer) bindings).findParameter(pParameterName);
    return param.getValue();
    * Convenience method to find a DCControlBinding as an AttributeBinding
    * to get able to then call getInputValue() or setInputValue() on it.
    * @param pBindingContainer binding container
    * @param pAttributeName name of the attribute binding.
    * @return the control value binding with the name passed in.
    public static AttributeBinding findControlBinding(BindingContainer pBindingContainer, String pAttributeName)
    if (pAttributeName != null)
    if (pBindingContainer != null)
    ControlBinding ctrlBinding = pBindingContainer.getControlBinding(pAttributeName);
    if (ctrlBinding instanceof AttributeBinding)
    return (AttributeBinding) ctrlBinding;
    return null;
    * Convenience method to find a DCControlBinding as a JUCtrlValueBinding
    * to get able to then call getInputValue() or setInputValue() on it.
    * @param pAttributeName name of the attribute binding.
    * @return the control value binding with the name passed in.
    public static AttributeBinding findControlBinding(String pAttributeName)
    return findControlBinding(getBindingContainer(), pAttributeName);
    * Return the current page's binding container.
    * @return the current page's binding container
    public static BindingContainer getBindingContainer()
    return (BindingContainer) JSFUtils.resolveExpression("#{bindings}");
    * Return the Binding Container as a DCBindingContainer.
    * @return current binding container as a DCBindingContainer
    public static DCBindingContainer getDCBindingContainer()
    return (DCBindingContainer) getBindingContainer();
    * Get List of ADF Faces SelectItem for an iterator binding.
    * Uses the value of the 'valueAttrName' attribute as the key for
    * the SelectItem key.
    * @param pIteratorName ADF iterator binding name
    * @param pValueAttrName name of the value attribute to use
    * @param pDisplayAttrName name of the attribute from iterator rows to display
    * @return ADF Faces SelectItem for an iterator binding
    public static List<SelectItem> selectItemsForIterator(String pIteratorName, String pValueAttrName, String pDisplayAttrName)
    return selectItemsForIterator(findIterator(pIteratorName), pValueAttrName, pDisplayAttrName);
    * Get List of ADF Faces SelectItem for an iterator binding with description.
    * Uses the value of the 'valueAttrName' attribute as the key for
    * the SelectItem key.
    * @param pIteratorName ADF iterator binding name
    * @param pValueAttrName name of the value attribute to use
    * @param pDisplayAttrName name of the attribute from iterator rows to display
    * @param pDescriptionAttrName name of the attribute to use for description
    * @return ADF Faces SelectItem for an iterator binding with description
    public static List<SelectItem> selectItemsForIterator(String pIteratorName, String pValueAttrName, String pDisplayAttrName, String pDescriptionAttrName)
    return selectItemsForIterator(findIterator(pIteratorName), pValueAttrName, pDisplayAttrName, pDescriptionAttrName);
    * Get List of attribute values for an iterator.
    * @param pIteratorName ADF iterator binding name
    * @param pValueAttrName value attribute to use
    * @return List of attribute values for an iterator
    public static List attributeListForIterator(String pIteratorName, String pValueAttrName)
    return attributeListForIterator(findIterator(pIteratorName), pValueAttrName);
    * Get List of Key objects for rows in an iterator.
    * @param pIteratorName iterabot binding name
    * @return List of Key objects for rows
    public static List<Key> keyListForIterator(String pIteratorName)
    return keyListForIterator(findIterator(pIteratorName));
    * Get List of Key objects for rows in an iterator.
    * @param pIterator iterator binding
    * @return List of Key objects for rows
    public static List<Key> keyListForIterator(DCIteratorBinding pIterator)
    List<Key> attributeList = new ArrayList<Key>();
    for (Row r: pIterator.getAllRowsInRange())
    attributeList.add(r.getKey());
    return attributeList;
    * Get List of Key objects for rows in an iterator using key attribute.
    * @param pIteratorName iterator binding name
    * @param pKeyAttrName name of key attribute to use
    * @return List of Key objects for rows
    public static List<Key> keyAttrListForIterator(String pIteratorName, String pKeyAttrName)
    return keyAttrListForIterator(findIterator(pIteratorName), pKeyAttrName);
    * Get List of Key objects for rows in an iterator using key attribute.
    * @param pIterator iterator binding
    * @param pKeyAttrName name of key attribute to use
    * @return List of Key objects for rows
    public static List<Key> keyAttrListForIterator(DCIteratorBinding pIterator, String pKeyAttrName)
    List<Key> attributeList = new ArrayList<Key>();
    for (Row r: pIterator.getAllRowsInRange())
    attributeList.add(new Key(new Object[]
    { r.getAttribute(pKeyAttrName) }));
    return attributeList;
    * Get a List of attribute values for an iterator.
    * @param pIterator iterator binding
    * @param pValueAttrName name of value attribute to use
    * @return List of attribute values
    public static List attributeListForIterator(DCIteratorBinding pIterator, String pValueAttrName)
    List attributeList = new ArrayList();
    for (Row r: pIterator.getAllRowsInRange())
    attributeList.add(r.getAttribute(pValueAttrName));
    return attributeList;
    * Find an iterator binding in the current binding container by name.
    * @param pName iterator binding name
    * @return iterator binding
    public static DCIteratorBinding findIterator(String pName)
    DCIteratorBinding iter = getDCBindingContainer().findIteratorBinding(pName);
    if (iter == null)
    throw new RuntimeException("Iterator '" + pName + "' not found");
    return iter;
    * @param pBindingContainer
    * @param pIterator
    * @return
    public static DCIteratorBinding findIterator(String pBindingContainer, String pIterator)
    DCBindingContainer bindings = (DCBindingContainer) JSFUtils.resolveExpression("#{" + pBindingContainer + "}");
    if (bindings == null)
    throw new RuntimeException("Binding container '" + pBindingContainer + "' not found");
    DCIteratorBinding iter = bindings.findIteratorBinding(pIterator);
    if (iter == null)
    throw new RuntimeException("Iterator '" + pIterator + "' not found");
    return iter;
    * @param pName
    * @return
    public static JUCtrlValueBinding findCtrlBinding(String pName)
    JUCtrlValueBinding rowBinding = (JUCtrlValueBinding) getDCBindingContainer().findCtrlBinding(pName);
    if (rowBinding == null)
    throw new RuntimeException("CtrlBinding " + pName + "' not found");
    return rowBinding;
    * Find an operation binding in the current binding container by name.
    * @param pName operation binding name
    * @return operation binding
    public static OperationBinding findOperation(String pName)
    OperationBinding op = getDCBindingContainer().getOperationBinding(pName);
    if (op == null)
    throw new RuntimeException("Operation '" + pName + "' not found");
    return op;
    * Find an operation binding in the current binding container by name.
    * @param pBindingContianer binding container name
    * @param pOpName operation binding name
    * @return operation binding
    public static OperationBinding findOperation(String pBindingContianer, String pOpName)
    DCBindingContainer bindings = (DCBindingContainer) JSFUtils.resolveExpression("#{" + pBindingContianer + "}");
    if (bindings == null)
    throw new RuntimeException("Binding container '" + pBindingContianer + "' not found");
    OperationBinding op = bindings.getOperationBinding(pOpName);
    if (op == null)
    throw new RuntimeException("Operation '" + pOpName + "' not found");
    return op;
    * Get List of ADF Faces SelectItem for an iterator binding with description.
    * Uses the value of the 'valueAttrName' attribute as the key for
    * the SelectItem key.
    * @param pIterator ADF iterator binding
    * @param pValueAttrName name of value attribute to use for key
    * @param pDisplayAttrName name of the attribute from iterator rows to display
    * @param pDescriptionAttrName name of the attribute for description
    * @return ADF Faces SelectItem for an iterator binding with description
    public static List<SelectItem> selectItemsForIterator(DCIteratorBinding pIterator, String pValueAttrName, String pDisplayAttrName, String pDescriptionAttrName)
    List<SelectItem> selectItems = new ArrayList<SelectItem>();
    for (Row r: pIterator.getAllRowsInRange())
    selectItems.add(new SelectItem(r.getAttribute(pValueAttrName), (String) r.getAttribute(pDisplayAttrName), (String) r.getAttribute(pDescriptionAttrName)));
    return selectItems;
    * Get List of ADF Faces SelectItem for an iterator binding.
    * Uses the value of the 'valueAttrName' attribute as the key for
    * the SelectItem key.
    * @param pIterator ADF iterator binding
    * @param pValueAttrName name of value attribute to use for key
    * @param pDisplayAttrName name of the attribute from iterator rows to display
    * @return ADF Faces SelectItem for an iterator binding
    public static List<SelectItem> selectItemsForIterator(DCIteratorBinding pIterator, String pValueAttrName, String pDisplayAttrName)
    List<SelectItem> selectItems = new ArrayList<SelectItem>();
    for (Row r: pIterator.getAllRowsInRange())
    selectItems.add(new SelectItem(r.getAttribute(pValueAttrName), (String) r.getAttribute(pDisplayAttrName)));
    return selectItems;
    * Get List of ADF Faces SelectItem for an iterator binding.
    * Uses the rowKey of each row as the SelectItem key.
    * @param pIteratorName ADF iterator binding name
    * @param pDisplayAttrName name of the attribute from iterator rows to display
    * @return ADF Faces SelectItem for an iterator binding
    public static List<SelectItem> selectItemsByKeyForIterator(String pIteratorName, String pDisplayAttrName)
    return selectItemsByKeyForIterator(findIterator(pIteratorName), pDisplayAttrName);
    * Get List of ADF Faces SelectItem for an iterator binding with discription.
    * Uses the rowKey of each row as the SelectItem key.
    * @param pIteratorName ADF iterator binding name
    * @param pDisplayAttrName name of the attribute from iterator rows to display
    * @param pDescriptionAttrName name of the attribute for description
    * @return ADF Faces SelectItem for an iterator binding with discription
    public static List<SelectItem> selectItemsByKeyForIterator(String pIteratorName, String pDisplayAttrName, String pDescriptionAttrName)
    return selectItemsByKeyForIterator(findIterator(pIteratorName), pDisplayAttrName, pDescriptionAttrName);
    * Get List of ADF Faces SelectItem for an iterator binding with discription.
    * Uses the rowKey of each row as the SelectItem key.
    * @param pIterator ADF iterator binding
    * @param pDisplayAttrName name of the attribute from iterator rows to display
    * @param pDescriptionAttrName name of the attribute for description
    * @return ADF Faces SelectItem for an iterator binding with discription
    public static List<SelectItem> selectItemsByKeyForIterator(DCIteratorBinding pIterator, String pDisplayAttrName, String pDescriptionAttrName)
    List<SelectItem> selectItems = new ArrayList<SelectItem>();
    for (Row r: pIterator.getAllRowsInRange())
    selectItems.add(new SelectItem(r.getKey(), (String) r.getAttribute(pDisplayAttrName), (String) r.getAttribute(pDescriptionAttrName)));
    return selectItems;
    * Get List of ADF Faces SelectItem for an iterator binding.
    * Uses the rowKey of each row as the SelectItem key.
    * @param pIterator ADF iterator binding
    * @param pDisplayAttrName name of the attribute from iterator rows to display
    * @return List of ADF Faces SelectItem for an iterator binding
    public static List<SelectItem> selectItemsByKeyForIterator(DCIteratorBinding pIterator, String pDisplayAttrName)
    List<SelectItem> selectItems = new ArrayList<SelectItem>();
    for (Row r: pIterator.getAllRowsInRange())
    selectItems.add(new SelectItem(r.getKey(), (String) r.getAttribute(pDisplayAttrName)));
    return selectItems;
    * Find the BindingContainer for a page definition by name.
    * Typically used to refer eagerly to page definition parameters. It is
    * not best practice to reference or set bindings in binding containers
    * that are not the one for the current page.
    * @param pPageDefName name of the page defintion XML file to use
    * @return BindingContainer ref for the named definition
    private static BindingContainer findBindingContainer(String pPageDefName)
    BindingContext bctx = getDCBindingContainer().getBindingContext();
    BindingContainer foundContainer = bctx.findBindingContainer(pPageDefName);
    return foundContainer;
    * @param pOpList
    public static void printOperationBindingExceptions(List pOpList)
    if (pOpList != null && !pOpList.isEmpty())
    for (Object error: pOpList)
    _LOGGER.severe(error.toString());
    * Programmatic invocation of a method that an EL evaluates to.
    * The method must not take any parameters.
    * @param pEl EL of the method to invoke
    * @return Object that the method returns
    public static Object invokeEL(String pEl)
    return invokeEL(pEl, new Class[0], new Object[0]);
    * Programmatic invocation of a method that an EL evaluates to.
    * @param pEl EL of the method to invoke
    * @param pParamTypes Array of Class defining the types of the parameters
    * @param pParams Array of Object defining the values of the parametrs
    * @return Object that the method returns
    public static Object invokeEL(String pEl, Class[] pParamTypes, Object[] pParams)
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ELContext elContext = facesContext.getELContext();
    ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
    MethodExpression exp = expressionFactory.createMethodExpression(elContext, pEl, Object.class, pParamTypes);
    return exp.invoke(elContext, pParams);
    * Sets the EL Expression with the value.
    * @param pEl EL Expression for which the value to be assigned.
    * @param pVal Value to be assigned.
    public static void setEL(String pEl, Object pVal)
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ELContext elContext = facesContext.getELContext();
    ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
    ValueExpression exp = expressionFactory.createValueExpression(elContext, pEl, Object.class);
    exp.setValue(elContext, pVal);
    * Evaluates the EL Expression and returns its value.
    * @param pEl Expression to be evaluated.
    * @return Value of the expression as Object.
    public static Object evaluateEL(String pEl)
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ELContext elContext = facesContext.getELContext();
    ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
    ValueExpression exp = expressionFactory.createValueExpression(elContext, pEl, Object.class);
    return exp.getValue(elContext);
    }

  • How to commit data when item is being validated

    the problem is, that I have an input field on the form. when
    ever I make changes in it I need to validate the change first.
    and if its validated then I need to make certain changes in the
    database and commit.
    I have written code in when-validate-item, which is called when
    ever I make change in the input field. In this trigger I first
    check data entry is correct and then make certain changes in the
    database and finally when I try to commit the changes I made it
    gives me error message of illegal restriction cannot use commit
    procedure in when-validate-item.
    can anyone help me as how can I validate an input field first
    and then make transactions in the database and commit.
    thanks

    Hi
    I do not know exactly what you want to
    do, so use this with care.
    If you want to commit only the database
    (not forms itself), you can use:
    forms_ddl('commit');
    If you need to commit the form itself,
    in the when-validate-item you can
    create a timer, and in the when-timer-expired
    trigger do a commit.
    Luis Cabral

  • How to COMMIT all open transactions?

    Hi,
    I have 10.2.0.4 on Windows.
    I need to run a critical month-end DataPump export of 1 schema. Easy enough. The system will be in-use by the end users when this runs. Not many maybe 10 users will be connected and it is not a very large db - 10 GB.
    My concern is that there may be a few uncommitted transactions hanging around that may not be written to the dump file. If I run COMMIT; that only commits for my session, right? How can I force all open transactions for all users to be committed just before I run the DP export?
    -OR- is DataPump so sophisticated that it will auto. commit them first?
    Thanks for your ideas. John

    user629010 wrote:
    Thanks, Justin.
    This is a 24 hour system so I don't want to interrupt the users unless there is no other option.
    Yes the RMAN backups are complete but I just need the export for purposes of refreshing my reporting database at each month-end. So I will use impdp to do the import. This is the way we have been doing it for awhile.
    We only recently became aware of some out-of-balance issues (money) and we thought uncommitted transactions may be partly responsible.
    I know the application code controls when the commit takes place but, in general, is this something you would be concerned with?
    Another question if I may: how can I see how many open transactions there are at a given time?
    Thanks, JohnIf you think about what constitutes a "transaction" (and financial balances are the textbook example of such) then you realize that it is absolutely the responsibility of the transaction to decide when to commit. An outside process (like an evil DBA) can safely force a rollback of an incomplete transaction (say, by killing the session), but to force a COMMIT? Suppose the session had only updated 2 of 4 tables that needed to be updated to consitute a complete transaction and guarantee your account balances? How do you suppose your "force" will know what the other two table updates are?
    Maybe you could explain in more detail how you intend to use this export, particularly in relation to where it was you found the out of balance issues..

  • How to commit primary key in a multi level form

    Hi ,
    I am using Jdeveloper 10.1.2.3. ADF - Struts jsp application.
    I have an application that has multiple levels before it finally commits, say:
    Level 1 - enter name , address, etc details -- Master Table Employee
    Level 2 - Add Education details -- Detail Table Education
    Level 3 - Experience -- Detail Table Experience.
    Level 4 - adding a Approver -- Detail Table ApplicationApproval
    In all this from Level 1 I generate a document number which is the primary key that links all these tables.
    Now if User A starts Level 1 and moves to level 2,he gets document no = 100 and then User B starts Level 1 and also gets document no = 100 because no commit is executed.
    Now I have noticed that system crashes if User B calls a vo.validate().
    How can I handle this case as Doc no is the only primary key.

    Hi,
    This is what my department has been doing even before I joined and its been working for our multi user environment for these many years.
    We have a table called DOC_SRNO which will hold a row for our start docno , next number in running sequence. the final number. We have this procedure that returns next num to calling application and increments the next num by 1 in the table. and final commit on the application commits all this.
    I am not sure how this was working so far but each of those applications were for different employees. I am assuming this is how it worked.
    Now in the application that I am working on, has no distinct value. So two users could generate the same docno and proceed.
    I will try the DB sequence but here is what I tried. I call the next num from DOC_SRNO and I commit this table update and then proceed with this docno so at a time both gets different docno's.
    But my running session crashes when I go to next level to insert into the detail table of my multi level form. Here when I try to get the current row from the vo which is in context, it crashes.
    Here's the steps.
    Three tables : voMainTable1 and voDetailTable1 and voDetailTable2.
    voMainTable1 on create row1- I generate new docno - post changes
    voMainTable1 on create row2- I genrate another docno - post changes
    set voMainTable1 in context
    Now I call voDetailTable1 and to get the docno to join master detail, I try to get voMainTable1.getCurrentRow. Here it crashes.
    How can I avoid this

  • Double space for period. How about comma, too?

    It's already kosher with the interface guidelines to
    double space at the end of a sentence to get a
    period, so how do I get people on the bandwagon
    to make the spacebar a dual- or tri-function spacebar:
    double tap for a comma, period, or question mark:
    |   ,   |   .   |   ?   | <-----spacebar with
    -----------------------           punct zones
    Double-tap at the left edge for comma space, double-tap
    near the middle for period space, and at the right edge
    for question mark space. Why have to go to a separate
    screen to type a comman and then come back to the text
    keyboard? That's inifficient.
    Comma, period, and question mark. That hits most of the major
    marks used. Yeah, there's the exclamation point, but the
    real estate on the spacebar reliably handles only three
    marks. Four may be hard to employ, but I may be wrong.
    I suggested this to Apple two years ago, and nothing's
    been added to the OS.
    Comments?
    Doug Parker
    Orlando, FL

    Firstly, when I said InDesign inflates the space I didn't mean it whacked in a great chunk of space. It just gives a little bit more air relative to the fit of the text around it. You may not always see any noticeable difference. But when I read a book I don't want to see obvious white spaces at the start of every sentence. As long as the full point and following capital letter register on my brain fast enough that I am reading a new sentence, that's good enough for me. I think it makes reading more fluid. If you want to see extra space at the start of a sentence, then it's probably best to carry on with your double spacebar - unless you want to try something more exotic like a fixed width space.
    I didn't mean you to literally type <full point><space><any character> into the find. I was just trying to tell you what to input. Type the full point, hit the spacebar, and then use the options list to the right of the find field (shown as a @), select "Wildcards", then select "any character". What you should see in your find field is . ^?
    You could then enter .  ^?      - that's two spaces. See why I spelled it out as <space>? -  into the change to field.
    k

  • How to Commit in InfoBus Data Items

    Hi,
    I created an Applet using JDev2.0. I called the DB schema using
    Connection Manager, InfoBus Data Items, SessionInfo and
    rowSetInfo.
    I customised the UI form using Infoswing. As per my logic, after
    user modified the data and press the SUBMIT button, I should call
    the commit for the rowSetInfo.
    How can I issue commit or how to resolv the modified rowSetInfo.
    Previously I used Jdev1.1 and Borland's dataset and it works
    fine.
    Now, Oracle is not supporting Borland's dataset and AWT. So, now
    I am rewritting the whole application using JDev2.0.
    Thanks in advance.
    Ramesh S.
    null

    Hi,
    If your jsp is of type <ViewName>_SubmitInsertForm.jsp created by JDeveloper,then it should be having NavigationBar,EditCurrentRecord and ViewCurrentRecord, in that order
    If that is the case, you should also see a "Save Changes" Button in the form, which should commit the changes to the database
    --Sandeep                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to Commit transaction even the trigger fails?

    Hi Everyone,
    I got a situation here, i have two tables and a trigger. A main table and a log table. Whenever  a change happens in the main transaction ,   a log details will be inserted into the log table.
    Am using sql server 2000 and "For insert,update,delete" in one trigger. 
    I am in need of commiting the original transaction even if the trigger fails. I mean the main table is so important for me, so all the transaction should commit in the main table no matter if some transactions details missed in the log table.
    I tried with
    begin try
    -- statement
    end try
    begin catch
    commit transaction
    end catch.
    But it doesnt works. My insert fails whenever the trigger fails. i want the transaction should continue even if the trigger fails...
    Pls suggest me how to do it.. Thanx for your help

    If the trigger action is optional, it should not be in a trigger. The idea of a trigger is that it is part of the statement, so if the trigger fails, the statement fails.
    As for what your alternatives are, it depends on which version on SQL Server you are using. You first say SQL 2000, but then you discuss TRY CATCH which was added in SQL 2005.
    What always works is to have a separate process that scans the main table for changes and the update the log. It can be difficult to identify the changes, though. It helps if you are on SQL 2008 where you can use Change Tracking.
    Another solution is to put a message on a Service Broker queue in the trigger, and then you have an activation procedure where you perform the operation with the log table. Of course, the SEND operation may fail, and you are back on square one. But it may
    be less likely that this fails than producing the log operation if this is complex and fragile.
    Also, a possibility is to add this statement to the trigger:
    SET XACT_ABORT OFF
    In this case, some errors in the trigger will not cause the statement to fail. More precisely, not errors that under normal circumstances terminates only the current statement, for instance PK violations, NOT NULL errors. There are still
    plenty of errors that always aborts the batch and rolls back the open transaction. For instance, conversion errors often rolls back the transaction. Note that SET XACT_ABORT only has effect in SQL 2005 or later.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to commit a form using ctl S

    Hello,
    I'm new to oracle and I was wondering how can I commit a form by pressing ctl + s ?
    Thanks a lot.

    Hi,
    This depends on the frmXXXX.res file you have configured in your formsweb.cfg config file.
    These files are located on your <oracle_devsuite_home>/forms directory (assuming your on 10gR2 version, for 11g please take a look at this thread {thread:id=1053911} )
    #  FMRWEB.RES is the key definition file for webforms. The syntax is:
    #    JFN : JMN : URKS : FFN : URFD   (whitespace ignored)
    #      JFN = Java function number
    #      JMN = Java modifiers number
    #     URKS = User-readable key sequence (double-quoted)
    #      FFN = Forms function number
    #     URFD = User-readable function description (double-quoted)
    for example frmpcwebf.res maps
    121  : 0 : "F10"            : 36 : "Valider"
    and frmweb.res maps
    83   : 2 : "Ctrl+S"         : 36 : "Commit" you can also configure your res file regarding your needs.
    if you don't have a .res configured it takes (I think) a default configuration regarding the NLS parameter of your devsuite installation.
    Hope this helps
    Regards,
    Jean-Yves
    Edited by: JeanYves Bernier on 11 mars 2011 22:54

  • How to Commit Update for Oracle

    Hello,
    I'am using the Oracle JDBC : classes12.zip in a java application.
    How can I manage to make a commit of the updating operation I've made on the oracle tables ?
    Thanks.

    Normally by default a connection is set to atuo commit as soon as the statement is executed. If however u want to make the commit yourself then first
    <b>
    try {
    con.setAutoCommit(false);
    ...Do your Work here ........
    con.commit();
    } catch (SQLException se) {
    se.printStackTrace();
    con.rollback();
    </b>

  • How to commit/rollback a transaction encompasing multiple EJBs

    I have 2 Stateless Session Beans 'RulesManager' and 'BankManager'. Each EJB method in them gets a connection, perform the task, close the connection and return the results.
    Now in RulesManager I have an EJB method processRules(). And in BankManager I have an EJB method updateTransactions().
    I have a requirement that means I first have to call BankManager's updateTransactions() method; if successful then call RulesManager's processRules() method. IF its successfull as well then commit else rollback.
    I dont know how to do this. Can anybody help me in this regard?
    Thanks

    Thanks kdgregory. This is how the things work out in our application.
    I have a class BankDelegate which has each public method in BankManager SSB without the throws clause. Inside each method I get remote interface of BankManager SSB and then calls the corresponding EJB method.
    Similarly I have a RulesDelegate class which has each public method in RulesManager SSB without the throws clause. Inside each method I get remote interface of RulesManager SSB and then calls the corresponding EJB method.
    User press Update button on JSP which submits the form to another JSP. That JSP creates an instance of BankDelegate and call its updateTransactions() method.
    Each EJB method is using container managed transactions. Inside each EJB method, if anything failed then i issued a rollback using this._sessionContext.setRollbackOnly();
    I am using MS SQL Server 2000.
    Thanks

  • BC4J: How to commit multiple rows?

    I am trying to build scheduler application and for that I need to have a VO that displays 64 records (15 min time slots) so that user can enter some information in each time slot and commit. So this would commit changes to 64 records at the time. How to create this VO? What are the best practices to create this kind of application?
    I did see some posts related to 'calendar' application that some users are courious how to do, and seems like that some sample code would be beneficial to our community.
    rade

    Does the database only contain data where there are events on a given 15-minute time slot?

  • How does commit() work?

    I have a jsp page which uses jdbc to just show reports .. These reports show what would happen at the end of the year if you added the salaries... but I dont want to actually add the salaries...
    So how do I do this? Do I not have a commit()? What if another page is accessed by some other user which uses jdbc and at the end he commits? Will it affect this page?

    I have a jsp page which uses jdbc to just show reports
    .. These reports show what would happen at the end of
    the year if you added the salaries... but I dont want
    to actually add the salaries...If you are actually adding the salaries into the table then you are doing it wrong.
    You should create a report that gets the results from the table and adds the values to the results. Doing this means that there are no changes to the database and thus commit/rollback has no impact (and is not needed.)

Maybe you are looking for

  • Crash report (Safari) -- feedback appreciated

    I frequently experience crashes in Safari that I suspect are related to viewing of videos, since they seem to occur soon after (or while) I've done that. Can anyone here help me decode the following crash report? Thanks. Date/Time: 2007-12-18 05:57:2

  • I have a problem with my mic i have g62-a13se

    What can I do with my mic when I talk to someone I here an echo and avery loud noise ?????

  • Order management queries

    Hi all, Can we restrict inventory organization to responsibilities ? what profile option need to be set? Can we have one operating unit with two different item master organizations? Can we restrict(hide from other inv orgs in same O U) Purchase Order

  • [SOLVED] ISO C++ forbids declaration of 'linkedStackType' with no type

    I got an error when building my program. The program was working fine for a while before showing this error:     In file included from truck.cpp:1:     truck.h:62: error: ISO C++ forbids declaration of 'linkedStackType' with no type     truck.h:62: e

  • Prblem in SAP Quesry

    i have copied one query from 4.6b to 4.7 ..now sales value is not comming..tables used mara,makt,amrd and mvke..