Choosing the records to save in a database based block

Hi everybody,
I'm working with oracle 10g forms builder, I have a database based block.. in which I'll populate a number of records retrieved from a cursor. In that block, I have a non database item which a checkbox.
The user can select the records he wants to save by setting the checkbox to check.
Only the selected records should be checked.
Can anyone please help me implementing that.
Thanking you all in advance.
Cheers.

Commit processing in Forms is an all or nothing process. You cannot pick and choose which records will be commited during a Commit_Form or Commit call. Based on your description, I don't see why you would need to use the checkbox to keep track of which records are new since you state that you add the records through a cursor and then to save them. Forms already keeps track of which records were queried into a block and which records are new so a simple call to Commit_Form will accomplish what you want without the need to manually keep track of which records are new.
Hope this helps,
Craig
If a response is helpful or correct, please mark it accordingly.

Similar Messages

  • Why does SHDB stop the recording when "Save" is done in VA01 ?

    Hi,
    Here is my problem:
    - When I run VA01 manually and save my sales order, the transaction does not exit: I can see the sales order number in the status bar and continue to work in the same screen.
    - When I do the same with transaction SHDB (transaction recorder), VA01 exits just after Save and the recording stops.
    I tried to play with the different options of SHDB but nothing worked so far.
    Does anyone have an explanation, or better, a solution ?
    Thanks in advance !

    Normally, you run your recording in a loop, so you want to exit the transaction when an order is saved so that you can go on with the next one.
    Rob

  • Choosing the location to save files

    Can somebody PLEASE tell me a way to get around apples friggin strangle hold over where i can save files in most programs (safari, office { i know i know, infecting my computer with the microsoft virus is stupid but i need it for UNI} and lots of other programs). I click File, Save As, and all i get is a small list of generic places to save stuff... Its Bull! Even windows 3.1 had the ability to save where ever you liked. Come to think of it, even DOS had the ability to. Hopefully someone can tell me how to get around this (if you can) or someone at apple gets embarrassed enough by this STUPID hassle and fixes it.
    Thanks in advance.
    Leigh

    Navigating Apple's file system is a piece of cake; always has been. However, if you have suggestions about how it should be done and wish to embarrass the software engineers try here:
    http://www.apple.com/feedback/

  • Problem when printing the records of database

    Hi all,
    Although I can use the PrinterJob class to print the records of certain table in database directly to printer, it is difficult to deal with the different length of fields between different records so that, say, the first field of some records overlap with the second field when printing.
    I find any layout/table method in java cannot be used in the PrinterJob class, only Graphics can be used. Does anyone know how to print the database in a good way?
    thanks!

    Perhaps java.text.MessageFormat is what you're looking for.
    Note that in v1.4 there's also the new Java Print Service API (javax.print). (I haven't used it yet).
    Greets
    Puce

  • Loosing the record on UI upon save

    Hi
    i am settins some value on text UI element , but after i save the record it saves correctly in the backend however diappears in the UI level , can any body assist
    Rgds

    Hi Akeel,
    Please check the Save button action, if you are invalidating the context node for this.
    Once you call method for updating backend data in the onaction of save buton, you can try to call display method to show in the same screen with updated results.
    Hope it will helps
    Regards
    Arun Jaiswal

  • Forms 6i save photo inside database table

    dear people
    I have table with 2 fields no number(10), photo_path varchar2(300)
    these 2 fields have number and the path of fotos, and i form to look at these paths and find the photo and save it on database table.
    by the way i am using forms 6i and db 8i
    please help me how to do it
    Edited by: yasser_egypt on Nov 22, 2012 6:25 AM
    Edited by: yasser_egypt on Nov 22, 2012 6:43 AM

    Hello Yasser
    It seems good to hear about your first isseu.
    for the second isseu i didn't try to it before but i think it can be done .
    but let us think about the previous code fro inserting images in blob .
    when i added a message with the filename it appears the path like that
    DECLARE
    filename VARCHAR2(256);
    BEGIN
    filename := GET_FILE_NAME (File_Filter => 'jpg (*.jpg)|*.*|');
    READ_IMAGE_FILE(filename, 'jpg', 'IMAGE6');
    MESSAGE(filename);MESSAGE(filename); ---- = D:\KHALED_WORK\hr_demo\pic.jpg
    END;
    so i think if you tried to
    1- create 2 temp table
    FIRST one 2 columns holding the images path and you record id x_temp
    second 2 columns holding the image blob and you record id x_temp2
    2- creat an update form on the x_temp2 contains
    1- image
    2- your id pk
    3- two push_button
    3- the push putton should be like cursor loop at the temp table and updates your image table.
    like
    declare
    cursor pic is
    select p_path , p_id from x_temp;
    begin
    for i in pic loop
    READ_IMAGE_FILE(p_path, 'jpg', 'IMAGE6');
    record_id := i.p_id;
    commit;
    next_record;
    end loop;
    end;
    4- the second push putton updates the main table from the x_temp2 where id = id
    i think that senario should work like that
    try it and hope it works
    Respectfully
    Khaled Farouk

  • Tempolary add record into cookies before into database

    Hi,
    I'm developing cart system, the user can add more than 1 items (planning to use tabular form), however, the record straight away go into database. The result i wanted is after the user add item into cart, go to next process where user need to type in their personal details, then click on submit, then the record all go to database.
    So i wondering, if i can save the record in the cookies/xml before the user finish the check out.
    I been thinking, is there any other method to accomplish this?
    e.g.
    all the insert/update/delete can rollback if the user not complete the process.
    Please help. or got other way to do this?
    ~vincent.

    APEX Collections would be the recognised approach.
    There is an Online Store packaged application that you might want to look at.

  • Want to sort the records based on non-base table item

    I have a multi-record block and I am trying to sort the data based on nbt item
    I have a table called X which has x_type,x_code fields.
    The table on which the block is created is Y. the table Y has x_type and y_desc as its fields
    form layout is like below .the x_type is key field on which I have to query the records
    and x_code is a non-base item in the form.I want to sort the records by X_code.
    x_code y_desc
    A     xyz
    c par
    B     lmn
    my pre-query has this code
    select x_type from y
    where
    x_type := x_type;
    post-query has this code
    select x_code from x
    where x_type = :x_type;     
    It works fine in Enter-Queryand execute query mode. but when I am sorting the records on
    nbt item x_code by SET-BLOCK-PROPERTY it doesn't do any thing

    Hi Tony ,
    I have created a function and in Pre-Query & have add this
    SET_BLOCK_PROPERTY('b1', ORDER_BY, 'fn_get_code(x_type)');
    and the function created is as below
    Function fn_get_code (p_x_type in varchar2) return varchar2 is
    v_code varchar2(40);
    begin
    select x_code into v_code
    from X, Y
    where X.x_type = Y.x_type
    and y.x_type = p_x_type
    return v_code;
    end;
    when I run the form and execute query it comes up with the error message
    FRM-40505 and when I pressed display error it shows
    SQL Statement error:
    SELECT ROWID,X_TYPE,X_CODE
    FROM Y order by fn_get_code(x_type)
    Error:
    "ORA-00904: "FN_GET_code": invalid identifier"
    Is it that I need to create a function on the database?. As I have created function
    in program unit section

  • Error while saving the records in the database

    Hi,
    I am running into a wierd error.
    I have built a new page which contains the information about the employees. Some of the fields are updatable fields. The page shows the details of the person who logs into the page.
    I am not using EO in this page. The data is queried from the database from VO and displayed in the page and when the records are updated, they are saved in the databased using pl/sql procedure which is
    being called from AM. So i am basically not using VO to save the records in the database.
    The error which i am getting is,
    If 2 users are trying to update the page at the same time, user A's details are updated in user B's page.
    This is really causing the issue. Any help is greatly appreciated.
    Thanks in advance.
    PK

    I have posted the code used along with the dialog page. Please review.
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"Pavan, Start1",OAFwkConstants.STATEMENT);
    if (pageContext.getParameter("XYZBack")!=null)
    pageContext.setForwardURL("OA.jsp?OAFunc=OAHOMEPAGE"// OAWebBeanConstants.RETURN_TO_MENU_URL also tryed this , same error
    ,null
    ,OAWebBeanConstants.KEEP_MENU_CONTEXT
    ,null //not needed as we are retaining menu context
    ,null // no parameters are needed,true //retain AM,OAWebBeanConstants.ADD_BREAD_CRUMB_YES
    ,true
    ,null
    ,OAWebBeanConstants.IGNORE_MESSAGES);
    if(pageContext.getParameter("XYZUpdate") !=null)//The fields and their values are loaded as soon as the update button is clicked. We do this before calling the oadialog page so that the values are not lost
    OAViewObject EmpDetailsVO3 = (OAViewObject)OAAppl.findViewObject("XYZPersInfoVO");
    OARow EmpDetailsRow3 = (OARow)EmpDetailsVO3.first(); //Bringing the control over to the first row which is nothing but the displayed row.
    if(EmpDetailsRow3 !=null)
    s_workphone = EmpDetailsRow3.getAttribute("WorkPhone").toString();
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"workphone is: "+s_workphone,OAFwkConstants.STATEMENT);
    s_fax = EmpDetailsRow3.getAttribute("WorkFax").toString();
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"Fax is: "+s_fax,OAFwkConstants.STATEMENT);
    s_building = EmpDetailsRow3.getAttribute("Building").toString();
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"Building is: "+s_building,OAFwkConstants.STATEMENT);
    s_room = EmpDetailsRow3.getAttribute("Room").toString();
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"Room is: "+s_room,OAFwkConstants.STATEMENT);
    s_box = EmpDetailsRow3.getAttribute("Box").toString();
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"Box is: "+s_box,OAFwkConstants.STATEMENT);
    s_preferedname = EmpDetailsRow3.getAttribute("KnownAs").toString();
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"Preferred name is: "+s_preferedname,OAFwkConstants.STATEMENT);
    OAException OAExcep1 = new OAException("PER","XYZ_UPDATE_DETAILS");
    OAException OAExcep2 = new OAException("PER","XYZ_UPDATE_MESSAGE");
    OADialogPage OADialogPG1 = new OADialogPage(OAException.WARNING,OAExcep1,OAExcep2,
    OADialogPG1.setOkButtonToPost(true);
    OADialogPG1.setNoButtonToPost(true);
    OADialogPG1.setOkButtonLabel("Yes");
    OADialogPG1.setNoButtonLabel("No");
    OADialogPG1.setOkButtonItemName("DoOk");
    OADialogPG1.setNoButtonItemName("DoNo");
    OADialogPG1.setPostToCallingPage(true);
    pageContext.releaseRootApplicationModule();
    pageContext.redirectToDialogPage(OADialogPG1);
    else if(pageContext.getParameter("DoOk") != null)
    OAApplicationModule EmpDetailsAM = pageContext.getApplicationModule(webBean);
    Class[] paramtypes = {String.class, String.class, String.class, String.class,String.class,String.class,String.class};
    Serializable[] params = {s_personid,s_workphone,s_fax,s_building,s_room,s_box,s_preferedname};
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"personid is :"+s_personid,OAFwkConstants.STATEMENT);
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"workphone is :"+s_workphone,OAFwkConstants.STATEMENT);
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"workfax is :"+s_fax,OAFwkConstants.STATEMENT);
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"building is :"+s_building,OAFwkConstants.STATEMENT);
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"room is :"+s_room,OAFwkConstants.STATEMENT);
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"preferredname is :"+s_preferedname,OAFwkConstants.STATEMENT);
    pageContext.releaseRootApplicationModule();
    OAAppl.invokeMethod("TransactionCommit",params,paramtypes);
    OAAppl.invokeMethod("initDetails");
    throw new OAException("The Building and Phone Information have been saved successfully"
    ,OAException.INFORMATION);
    thank you

  • I can't save the record in a new/empy table of sqlserver in the entity Framework 5.0

    Hi guys ,
    I have tried to become a database expert in Entity Framework but I can't. because I am not able to save the record in a fresh/ empty table of sql server 2008 r2 database. for that I have watched the video tutorials step by steps that how to save the record.
    I followed the tutorials step by step and at the end the result is negative.
    I tried a simple way given below. please some one help me that where and what I missing the.
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using EmployeesLib;
    namespace EmpApplication
    public partial class Form1 : Form
    private EMPEntities _dbContext;
    public Form1()
    InitializeComponent();
    private void Form1_Load(object sender, EventArgs e)
    _dbContext = new EMPEntities();
    var sql = _dbContext.Employees;
    this.employeeBindingSource.DataSource = sql.ToList();
    private void employeeBindingNavigatorSaveItem_Click(object sender, EventArgs e)
    this.Validate();
    _dbContext.SaveChanges();
    I have used datagrid addid a row by Click Add button on the NavigationBindingsource entered an employee name
    and clicking the save button on the NavigationBindingSource. When I am restarting the application I nothing founding on the Datagrid I am saving before.
    below is the Connection String in the App.config file both in the project.
    APP.CONFIG connection string
        <add name="EMPEntities" connectionString="metadata=res://*/EmpModal.csdl|res://*/EmpModal.ssdl|res://*/EmpModal.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(local);initial catalog=Inventory;integrated
    security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

    humm, I falling the ball to the batsman(sqlserver) but it getting "NOBALL" in response(not saving). Ok it my be problem in visual studio I am struggling to remove my operating System, VS2013 and sql server, by reinstalling it might works.
    because i havent any other computer where these application are installed for the test.
    If you create and send me a small project that contain minimum of two columns of table( in sql server ) which can saving new data from datagrid so i will thankfull of you.
    it is just for confirmation that either the problem is in OS or VS.
    I doubt that any of it has anything to do with the issue. If you think it does, then you can post to the forums.
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vssetup
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?category=sqlserver
    I think you are riding a bad horse (that tutorial) you are using, and you need to change horses. I think the 'modified' state is not being rasied on the entity bound to the grid when it has changed, and EF is not going save any entity that's not in a modified
    state.

  • Can we split and fetch the records in Database Adapter

    Hi,
    I designed a Database Adapter to fetch the records from oracle Database. Some time, the Database Adapter need to fetch around 5000, or 10,000 records in single shot. In that case my BPEL process is choking and getting error as
    java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
    Could someone help me to resolve this?
    In Database Adapter can we split and fetch the records, if number of records more then 1000.
    ex. First 100 rec as one set and next 100 as 2nd set like this.
    Thank you.

    You can send the records as batches useing the debatching feature of db adapter. Refer documentation for implementation details.

  • 0 down vote favorite        I would like to ask the following question. I am using mac os x 10.9 maverics me quicktime player version 10.3. Can I trim a video recording without having to press the pause or save it as a file? Or can I add a new recording t

    0 down vote  favorite  
    I would like to ask the following question. I am using mac os x 10.9 maverics me quicktime player version 10.3. Can I trim a video recording without having to press the pause or save it as a file? Or can I add a new recording to a video file? Thanks in advance

    Well,
    I tried the "Internet Recovery" option and finally saw Mac OS X Mountain Lion's install page but after waiting 7 hours when I just thought its going to start installing, I got another progress bar with 36 hours remining time to download "Additional Components" then after progressing 2-3 hours, it shows "Unable to write installation something..., Contact Apple Care"
    Then I accidently rebooted the machine and now it seems Internet Recovery don't work anymore, it shows "support.apple.com - 40 something!" error, and finally when I tried to reboot using Recovery HD, I found it's gone as-well!
    To be honest, I don't know what to do now, I am and dissapointed... also I do not have any Apple Store nearby, there is an authorized country reseller almost 650/km far away from my residents and they even charges too high (like $250) for doing such repairs (as per phone conversation)
    If anyone have any idea or anything to help me with, please do share- I'd be eternally grateful!

  • Database adapter not returning all the records

    I've taken over a BPEL from a developer who left the organization and have been having an issue during our User Acceptance Testing. We are querying a table that will return the insurance enrollment information for employee's and their dependants. When an employee change plans, or adds people, the old plan is terminated and a new once is created. When this happens there will be two records on the database to show the old plan and the new plan.
    When we run the SQL thru JDEV or SQLDeveloper, the data comes out fine. When we run it through a BPEL Database Adapter we are only getting one of the rows returned.
    I have created a small tester BPEL that is easily modified and deployed to run the same query to try multiple configurations changes within the DBAdapter. What I have found is all the records are returned when the "Return single result set" box on the DBAdapter Wizard is unchecked. When it's checked then it only returns one record for the employees with an old and a new plan.
    Can someone explain what the "Return single result set" option does, and what the impact will be if it's unchecked?

    Hello,
    In same way i am using two parent-child(header-line) tables. they have one to many relationship.
    I want to generate XML which contains multiple line items under a child elements for header elements.
    I have tried it but i am getting only one line under that child item. i am using jdev10.0.3.3.0
    can u help me please.
    -regards
    satyendra

  • Database DLL error on editing the record selection formula?

    Post Author: Aravind
    CA Forum: Older Products
    Hi All,I recently edited the record selection formula of an old report and since then the report is issuing me an "Error detected by database DLL" error.The report was running fine earlier and still continues to run fine if I undo the changes. Earlier, the records were selected based on a 'date' field and I edited the formula to select records based on another date field, but the report doesn't work.The report runs fine on my local PC using Crystal Reports, but web based reporting fails with the error message. The data is selected from a view and the date parameters I talked about are the fields in the same view.This view has around five date parameters and the report runs fine for all of them, except one date field.Any pointers are appreciated.Crystal reports version is 8.5. Regards,Aravind.

    Post Author: DPowell
    CA Forum: Older Products
    Ah, yes, the good old generic date error.
    The problem is likely an invalid date value in one (or all) of your records with that field.  You don't say what database engine you are connected to or which driver you are using for the report, but I'll give you some "pointers".
    Basically, the SQL fetch has encountered an error in your date field and the driver you are using in the report can't handle it.
    A null date could cause that problem.  Also a date-time field with an invalid value or truncated time value.  A robust ODBC driver, like one of the Microsoft drivers might be able to overcome it.  Likewise, vendors frequently release updated drivers to improve error handling just like this.
    1.  Analyze your data, specifically the contents of the "new" date field you are using for some kind of invalid date.
    2.  Experiment with different ODBC drivers by creating alternate ODBC connections to the same database using different ODBC drivers.
    3.  Browse and experiment with options in Crystal Reports Properties that allow you to specify data conversions for NULLs and Dates.
    Good luck !

  • Display the records in forms when creating in a database

    hi to all
    i have a problem in forms, run in c\s using form6i..
    How can i display the records when i create a records to database and automatically display in forms when i open the forms or when creating a records?
    example:
    in form#1 , this is where i create records, i create records =A it will insert in database .when i update record A. I change A to B..then form#2 will also change to B and appear or dispaly in forms.
    in form#2, this has also a text item, when i open this form, it will appear the A records here, it will also update....
    what should be the best trigger to used and how to do this? plzzz help
    tnx in advance
    mica

    How can i display the records when i create a records
    to database and automatically display in forms when i
    open the forms or when creating a records?
    example:
    in form#1 , this is where i create records, i create
    records =A it will insert in database .when i update
    record A. I change A to B..then form#2 will also
    change to B and appear or dispaly in forms.Yours question is not clear to me , you didnt mention forms A and B contain the same underlying table or both have diffrent underlying table.
    My assumption both have diffrent table if its the case then use MERGE DML (introduced within 9i) and get refreshed it by TIMER (execute_query) within forms B.
    You need to clarify more what you wana achieve.
    Khurram

Maybe you are looking for