Notifying a forms client from the database

I would like to notify a forms client of a certain things that happens in the database.
I guess this could be done by having a timer polling a table at certain intervalls.
I my case that solution is not good because I need a fast reaction (<2 sec) which would require the client to poll in a high frequency.
Is there any way to do this?
Could I somehow embedd a java client in the form window that the database could notify and that then notifies the form client or perhaps start a back ground process that could listen to events and the notify the client somehow.
Any clues anyone?
Carl Larsson

Carl
2 Seconds doesn't sound like a particularly excessive frequency for the polling method, but it would be best combined with DBMS_ALERT as suggested by Jiri rather than looking at a table. I have had an application live for the last two years using this method involving 14 clients polling at one second intervals and have had no performance implications. DBMS_ALERT.WAITONE has the ability to wait a specified time for a reply, but this should be set to zero, so control is returned immediately to the form and all waiting is handled by the timer.
The Java method should in theory be more efficient if you have the knowledge to implement it (I don't !).

Similar Messages

  • Delete record from the form and from the database

    hi,
    i want delete record from the form and the database ,but the record is only delete from the from !!!
    this is my code :
    if //condition then
    delete_record;
    commit;
    end if ;
    Any solutions ??
    thnx

    You have unique key field(s) on the table you are trying to insert which actually restricts you from inserting the same value again.
    When you are deleting the record and issue commit there is a record to be inserted in the table which is a duplicate that's why you are getting this unique error.
    As oracle is not able to insert your commit fails and stops your deletion of record from table

  • How to Validate a Portal Form field from the database

    I created a Portal Form based on a procedure, which requires three parameters. One of the parameters is Item Number. I need to check if the Item Number exists in database. I am trying to use pl/sql button event handler, where I try to use the select count(*) statement to verify. However, I don't know how to reference the form field in the where clause. Please advise. Or is it possible to achieve this by creating a javascript? If you go to 'Shared Component' provider and click on javascript, you will see some system validation scripts, which you can call in the form level validation. My doubts with javascipt is how I can talk to database in the script? Any input is appreciated.

    Hi,
    You cannot access the DB from the script. If you want to access the values of a field you should use session variables. Here is a sample to access the values of a form field.
    declare
    ticket_no varchar2(20);
    flight_no varchar2(20);
    blk varchar2(30) := 'DEFAULT';
    begin
    ticket_no := p_session.get_value_as_varchar2(
    p_block_name => blk,
    p_attribute_name => 'A_TICKET_NO');
    flight_no := p_session.get_value_as_varchar2(
    p_block_name => blk,
    p_attribute_name => 'A_FLIGHT_NO');
    end;
    Thanks,
    Sharmila

  • How can i retrieve documents(.doc,.pdf, .txt) using forms from the database.

    How can i retrieve documents(e.g .doc,.pdf, .txt etc) using forms from the database.
    i inserted the documents using sql*loader, below is the control and data files.
    -- control file
    LOAD DATA
    infile 'load.txt'
    INTO TABLE husman
    APPEND
    FIELDS TERMINATED BY ','
    (id integer external,
    fname FILLER CHAR(50),
    docu LOBFILE(fname) TERMINATED BY EOF)
    --data file
    1,../husman/dell.doc,
    2,../husman/me.pdf,
    3,../husman/export.txt,
    in the form i have a text field to display the id and an OLE container to display the document as an icon. but when i execute query, i only get the id number and not the document.
    any help will be appreciated.
    Thanks
    Hussein Saiger

    Step by step
    1. Erase all contents and settings
    2. You'll be asked twice to confirm
    3. You'll see Apple logo and progress bar
    4. You'll see a big iPad logo on screen
    5. Configuration start
    6. Set language
    7. Set country
    8. Enable Location Service
    9. Select network, enter password and join network
    10. You'll be given 3 options (a) Setup as New iPad (b) Restore from iCloud Backup (c) Restore from iTune Backup
    11. Selected Restore from iCloud Backup
    12. You'll be required to enter Apple ID and Password
    13. Agree to Terms and Conditions
    14. Select Backup file
    15. You'll see progress bar
    16. Red slider will appear; slide to unlock; step #1 to #16 is fast
    17. Pre-installed apps will be restored first
    18. Message: Purchased apps and media will now be automatically downloaded
    19. You'll see a pageful of apps with Waiting/Loading/Installing
    20. Message: Some apps cannot be downloaded, please sync with computer

  • Javabean for file up-/down-load to/from the database

    Dear all,
    Has anyone any experience in client-side customizing/extending
    through the use of standard JavaBeans or
    Pluggable Java Components (PJCs) within the Oracle (Web-)Forms
    Developer 6i environment? We want to realize the
    following:
    By using a Java Bean within a (Web-)Forms 6i client that is
    capable of file uploads to and file downloads from a database
    (end tier).
    Important requirement is to uploads/downloads files (BLOB, CLOB)
    directly to/from the database, NOT TO/FROM THE FILESYSTEM.
    We have found a sample JavaBean on
    http://otn.oracle.com/sample_code/products/forms/content.html.
    Unfortunately, this code is based on file transfering to/from
    the filesystem.
    Is there someone who did customizations enabling file
    uploads/downloads into/from the database? Are there any
    other suggestions?
    Please contact:
    Deep Nanda
    Developer
    Wolters Kluwer Academic Publishers
    The Netherlands
    email: [email protected]
    Thanks in advance,
    Deep

    I've not tried this out but in theory since a Java Bean is just
    a piece of Java code you could do this using JDBC. However,
    while you may have a valid reason for this, it really defeats
    the purpose of having a middle tier. The idea behind the web
    deployment is that the bulk of the application is on a powerful
    server which makes the client as light weight as possible. If
    you add more functionality to the client (which is not UI
    specific) then you will increase the download to the client, you
    will impact the system requirements for the client and you will
    probably make the application less scalable (think about if yu
    have 1000 clients with database connections for the middle tier
    and now all 1000 want to connect from the client as well - yuo
    double the access of the database)
    SO the short answer is Yes yuo can in theory - in practice I
    would be very careful in deciding to move this way.
    Regards
    Grant Ronald
    Forms Product Management

  • Previewing images in forms 11g from the server

    Hi All,
    i need your help in this issue please
    i've just migrated my application from forms 6i to forms 11g
    there is a function in my application that i used that previewed images that exists on a network drive that are used in an image gallary
    now i don't have this setup as the application is hosted on the weblogic server
    i want an alternative method that i can use to preview the images from the server
    the old way was:
    read_image_file('.\default_image.jpg','any','preview.image_preview'); --this shows a default image if no image was selected
    if :search_results.file_path is not null then     
         read_image_file(:preview.image_path||'\'||:search_results.file_path,'any','preview.image_preview');     -- this shows the image that we retreived it's name from the database but it exists on the file system
    end if;
    i've configured the webutil but i don't know what method to use
    also another functionality that i lost in the migration is opening a browser window to preview the final article that the editor entered using my application
    the old way was:
    declare
         url varchar2(1000);
    begin     
         url:='http://10.100.100.197:55/allcontent/allcontentimages/'||:SEARCH_RESULTS.FILE_PATH||'';
    WIN_API_SHELL.WinExec('"C:\Program Files\Internet Explorer\IEXPLORE.EXE" '||url||'',
    WIN_API.SW_SHOWMAXIMIZED,TRUE);
    Exception when NO_DATA_FOUND then
    MESSAGE('CAN NOT FIND THE FILE');
    end;
    now ithe WIN_API_SHELL is not working as i'm on the server side and i don't know the alternative
    please advice

    Hello Nivin
    If you want to read an file from local drive or from netwrok drive then before reading images please make sure that do you have full rights and have you mapped that network drive .
    after that you use read_image_file built in(). secondly you configure WEBUTIL package.
    please visit the following link for configuring webutil.
    I configured my webutil package from this link and its worked fine.
    http://www.baigzeeshan.com/2010/01/open-file-dailog-box-example-using.html
    thanks
    G.Yassen

  • Consuming a web service from the database

    Hello,
    We have 10.2.0.2.0 database,oas 10.1.3.0.0, jdeveloper 10.1.3.
    We have to call our webservice deployed to the OAS from the database. The webservice is deployed and works fine (we can call it from a java application).
    The web service itself and the client proxy have been generated by the jdeveloper.
    The proxy has been loaded to the database and wrapped into a plsql package function using Jdeveloper "Load java and stored procedure deployment profile".
    When we run the function we receive the following error:
    calling http://z0001-app0821-s.hodc.ad.allstate.com:7779/amcddout_dvlp/DDRequesterWSSoapHttpPort java.lang.NoClassDefFoundError      at HTTPClient.HttpURLConnection.<clinit>(HttpURLConnection.java:166)      at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.createConnection(HttpSOAPConnection.java:697)      at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:347)      at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:796)      at java.security.AccessController.doPrivileged(Native Method)      at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:149)      at oracle.j2ee.ws.client.http.HttpClientTransport.invokeImpl(Unknown Source)      at oracle.j2ee.ws.client.http.HttpClientTransport.invoke(Unknown Source)      at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:169)      at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:110)      at com.amc.dd.ws.test.runtime.DDRequesterWSSoapHttp_Stub.sendMessage(DDRequesterWSSoapHttp_Stub.java:77)      at com.amc.dd.ws.test.DDRequesterWSSoapHttpPortClient.sendMessage(DDRequesterWSSoapHttpPortClient.java:42)      at com.amc.dd.WsTest.callWS(WsTest.java:12)
    Has anybody had the same problem?
    Thank you
    Kate

    Hi, I've dropped and reloaded all jars, and it started to work.
    Just in case someone else is struggling with the same problem, here is our configuration:
    10.2.0.2.0 database,oas 10.1.3.0.0, jdeveloper 10.1.3.
    Here is the command I've used to load the libraries:
    loadjava -u %CONN_STR% -r -v -f -genmissing -s -grant public %ORACLE_HOMEj%\soap\lib\soap.jar %ORACLE_HOMEj%\lib\dms.jar
    %ORACLE_HOMEj%\jlib\javax-ssl-1_1.jar %ORACLE_HOMEj%\j2ee\home\lib\servlet.jar %ORACLE_HOMEj%\j2ee\home\lib\mail.jar
    %ORACLE_HOMEj%\j2ee\home\lib\activation.jar %ORACLE_HOMEj%\j2ee\home\lib\http_client.jar
    %ORACLE_HOMEj%\j2ee\home\lib\ejb.jar %ORACLE_CALLOUT%\dbwsclientws.jar %ORACLE_CALLOUT%\dbwsclient
    And here are the priviledges that must have been granted to the user:
    dbms_java.grant_permission( 'myuser', 'SYS:java.lang.RuntimePermission', 'getClassLoader', '' )
    dbms_java.grant_permission( 'myuser', 'SYS:java.lang.RuntimePermission', 'accessClassInPackage.sun.util.calendar', '' )
    dbms_java.grant_permission( 'myuser', 'SYS:java.util.PropertyPermission', 'HTTPClient.socket.idleTimeout', 'write' )

  • Crystal Reports - Failed to retrieve data from the database

    Hi There,
    I'm hoping that somebody can help me.
    I've developed a crystal report from a stored procedure which I wrote. I can execute the stored procedure within SQL Server and within the Crystal Reports designer without any errors. Furthermore, I have imported the report into sap and can run it within SAP from the server without any errors. SAP version 8.81 PL5
    The issue is that when it's run from a client machine, I get the following error: "Failed to retrieve data from the database. Details: Database Vendor Code: 156. Error in the File RCR10010 {tempfile location}
    Here's a list of things which I have tried, all to no avail:
    - Checked user permissions to ensure that they have proper authorizations
    - Re-set the datasource connection and re-imported the report to SAP.
    - Exported the report and reviewed the datasource connection and re-imported to SAP.
    - Tried to run the report on multiple machines to ensure that it's not machine specific
    - Tried to run the report using different users to ensure it's not user specific.
    - Tested other reports built from stored procedures on client machines to ensure that they work.
    Any assistance in this would be GREATLY appreciated.
    Thank you

    After further testing, we found that the report could be run within SAP on any work station which had the CR designer installed on it.
    As it turns out, the procedure which I wrote has temp tables in it.  The runtimes built into the SAP client install do not support creating temp tables when executing the report from within SAP.  Which is why the report could not retreive data.
    To work around this, I installed external runtimes which were the same version of the Crystal Report and now the report can be run within SAP from any workstation which has the external runtimes (and not just the runtimes within the SAP client).
    I hope this makes sense.

  • ONLY ONE FIELD DOES NOT GET PREPOPULATED FROM THE DATABASE

    I would really, really appreciate if someone can comment or suggest something that would help with the resolution to the issue I am currently experiencing.
    Simple sample form that explains the issue can be accessed from the link below.
    How to test the form:
    Open the form.
    Click on the yellow button to add new Task.
    The problem is with Additional Product fields ( in blue). You can add as many of them as you want by clicking on the Red button with the +. Add some data and uploade in database. When you download it from the database, data will come back fine for all of them, except for the first one.
    Any ideas or help would be greatly appreciated.
    https://acrobat.com/#d=2vFWOlm56FmrC4owzpfHew 
    The code is behind the Red button with the +. Very  simple. Perhaps is the indexing issue with the database. I do not know enough about it, to be able to send any suggestion to the DB guy.
    According to the DB guy, data uploades without issue. It is the blank field when the form with data is downoloaded.

    It might be related to http://forum.java.sun.com/thread.jspa?threadID=583466&messageID=2988344

  • How do I remove a row from the database?

    Guys and Gals,
    I'm using Studio Edition Version 11.1.1.3.0.
    The code below will delete a row from my table, but how do I actually delete the row from the database as well?
        DCBindingContainer dcbc = (DCBindingContainer)getBindings();
        DCIteratorBinding dcib = dcbc.findIteratorBinding("TipsSelectorIterator");
        dcib.removeCurrentRow();
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = bindings.getOperationBinding("Commit");
        Object result = operationBinding.execute();
        AdfFacesContext adffacesctx = AdfFacesContext.getCurrentInstance();
        adffacesctx.addPartialTarget(this.getQueryTable()); In this post, I believe Frank sums up what I should do: Remove row from af:table
    >
    The problem in your case is that this removes the row from the iterator but not your business service. EJB exposes explicit methods to remove an entity. A method lime removeEmployees(employee) >expsed on the EJB model must be called.
    You can drag and drop the "removeEmployees" method then as a button to your page. Rename the text label to "Remove" or "Delete". In the opened dialog box, point the method argument to the >following EL #{bindings.iteratorName.currentRow.dataProvider}. Next time you press the button, the row is deleted from the iterator and the business service
    Huh? So to delete the row, I need to expose a method. But where? Do I do this in the AppModuleImpl so I can expose it to the Client Interface? But then how do I access entities? And what data type is the #{bindings.iteratorName.currentRow.dataProvider}?
    If anyone could point me in a general direction, it'd be great.

    Frank and Shay,
    Thank you both for your posts. I'm amazed there's such a great place to get help. Between the forums, ADF code corner, Not Yet Documented ADF Samples, various blogs and tutorials, it's obvious you guys really care about what you do.
    On my example, that approach doesn't seem to work. I tried following it like so in one of the video tutorials by Shay: http://blogs.oracle.com/shay/2010/04/doing_two_declarative_operatio.html. Following Shay's approach, in my particular case, deletes only from the table. Perhaps it is due to my iterator / collection setup?
    TipsSelector (1 to 1) -> TipsView (1 to *)-> DependentBom -(1 to * Recursive)> RecursiveBom
    TipsSelector references the same View Object as TipsView, but it is set as a 1 to 1 relationship so that I can show TipsView on the page one record at a time. This is the same setup as Tuhra2's hierarchy veiwer example. TipsView / DependentBom is a classic parent / child setup. RecursiveBom is DependentBom referencing itself. Think of it as departments within departments within departments etc...
    I have dragged TipsSelector's Named Criteria (All Queriable Attributes) onto my page and created an ADF Query with Table. A remove button on the table's toolbar calls the two actions, Delete (from TipsSelector's iterator) and then Commit. I have modified the code slightly from my previous post but the end result seems to be the same.
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = bindings.getOperationBinding("Delete");
        operationBinding.execute();
        bindings = getBindings();
        operationBinding = bindings.getOperationBinding("Commit");
        operationBinding.execute();
        AdfFacesContext adffacesctx = AdfFacesContext.getCurrentInstance();
        adffacesctx.addPartialTarget(this.getQueryTable());Page Def file
        <action id="Commit" InstanceName="AppModuleDataControl"
                DataControl="AppModuleDataControl" RequiresUpdateModel="true"
                Action="commitTransaction"/>
        <action IterBinding="TipsSelectorIterator" id="Delete"
                InstanceName="AppModuleDataControl.TipsSelector"
                DataControl="AppModuleDataControl" RequiresUpdateModel="false"
                Action="removeCurrentRow"/>On ppr of the query table, the row is gone. However, when I press the Search button on the query again, the record reappears.
    This is beyond me. Am I somehow deleting from the query results but not the database?

  • How to install Pro*C apart from the database?

    I would like to know how one could Pro*C apart from the database. Thanks.

    Just unzip all Instant Client zip files in the same directory, they all have "instantclient_11_2" as first path element,
    so everything will end up in the right place in this directory.
    If your Instant Client directory has a different name, unzip the package somewhere and move all files and
    directories in it to your instant client directory.
    Yours,
    Laurenz Albe

  • Viewing a PDF from the database

    Ok I am now finally down to the last thing that I need to get working on my program, at least for the time being. I am still doing research trying to find out how to do it but so far it has been unsuccessful, I am trying to make it so that the user can select a file on the database and then display that file in PDF form (the file is already in PDF) and then once it is displayed they can do whatever with it. I've already got the selecting the file taken care of now I'm just trying to figure out how to get the selected file to display on the screen.

    is there a way to download the file to a temp folder on the app server and then display it from thereIn order to write your file from the Database Server (DS) to the Application Server (AS) you will have either have the DS and AS be the same server or you will have a shared drive that is accessible from both servers. I personally like the use of shared drives. The reason for this is that the RDMBS can only read/write to the file system of the DS; conversly, the AS can only read/write to the file system of the AS. With a shared drive (Mount Point) the AS and DS can write to the same directory.
    So the question now is how to extract the file from the database to the filesystem. If you have access to My Oracle Support (MOS) look up *How to Write BLOBs Stored Inside the Database Out to Files [Doc ID: 330146.1]*. If you don't have access to MOS let me know and I'll post the code from this document. Basically you create a procedure that uses the DBMS_LOB package to read the file form your table in chunks and then writes these chunks of the file to the file system using the UTL_FILE package. When you write the file to the file system, you write it to the shared drive. The shared drive must be accessable by the AS processes on the AS. Then in your form you could server the file to the user with a simple WEB.SHOW_DOCUMENT() call. The file will be delivered to the user via the Browser and the user will have the choice of saving or viewing the file. You will need to work with your DS and AS admins to set things up on your servers. I also recommend you built a process on the AS that will routinely delete the files in this shared drive to prevent accidently serving up an old copy of a file and to eliminate stale files on the shared drive.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • CAN I PASS FORM VARIABLES TO THE DATABASE PROCEDURE IN PERSONALIZATION

    When I try to use form variable in the database procedure call from personalization I get the attached error.
    Under forms personalization
    From Actions tab --> builtin --> Execute Procedure when I call a database procedure and pass one of the form variable as parameter I get "ora-01008 couldn't be validate" error
    Can we pass on form variables to the database package using personalization ? If yes, then is this the right way?
    Message was edited by:
    omitchel

    I tried customizing the Quoting Form, it works.
    What you have done is correct, but this is how you call it
    ='begin
    db_proc('''||${item.qothddet_main.quote_name.value}||''');
    end'
    here
    qothddet_main : block name
    quote_name : item name
    Thanks
    Tapash

  • How To Save Modified Fields After query From The Database

    I Have This Customer Information Form That's Sort of an Ordering Forms , I Made It By LiveCycle v9.0
    And I Want To be able to search for Specific Record and Modify it and Save It Again to The DataBase
    I believe That We All Saw The (( Data Connected Forms Presentation )) For Pual Guerette
    At One Part Of The Presentation (Minute 0:26:00 specifically) When He Try To Search A Specific Record In the Database
    And He Got all this annoying Messages Then The Record what He looking Shows up ; He Said That We No Longer able to Modify The Record After We Doing the Search
    My First Question Is Why ???
    Is there anyway After I got that Specific Record I Want from the Database I Can make my modification on it and update it Back in the DB.
    OR i Have to Browse the whole DB looking for it Specially that I got this (ID Auto Increasment Number field Issue) Which leads me to ;
    My Second Qustion;
    Why I Can't just connect ''The Form Order Number'' to an Auto Increasment Number field in the DB
    Obviously i can't, So Can I do Anything to achieve this goal ??
    I Believe that we can Find some scripting to make that Happen 
    I Will Be So Grateful If There Is Any Helpful Answer
    FYI: I'm Not Java Expert So If There Is any Coding That's Can be Helpful Please POST ALL OF IT if you can ,,,,

    Hi,
    The information there is excellent and I would strongly recommend it.
    I don't have any public database examples and I am not inclined to spend time preparing an example if you are not prepared to read up on the methods.
    Stefan's site is the only link I have for databases.
    Good luck,
    Niall

  • The CFINPUT TYPE=DATEFIELD does not want to accept the date from the database

    I got a weird problem which I guess can be just a way to
    explain to the server how to interpret the value. I am using
    ColdFusion 8 with SQL 2005 Express. In my table, the field is a
    DATETIME field and shows the date with time (eg. 2007-07-23
    00:00:00).
    In my form, when I am adding using the DATEFIELD as the type
    for CFINPUT, it records the date correctly. But when I use the
    EDIT.cfm form and try to put the value from the database into the
    DATEFIELD CFINPUT, the server generate an error. Here is the error:
    2007-07-23 00:00:00/0 is an invalid date or time string.
    Of course, I tried many things but mostly I tried to force
    the format of the date with DATEFORMAT(qGetNewsInfos.dtIssued,
    'mm/dd/yyyy') and many more format but without success.
    Is anybody know the trick how to use a date into a
    <CFINPUT TYPE=DATEFIELD>?

    I tried the method like this and still got the same problem:
    <cfinput type="datefield" value="#DateFormat(now(),
    'mm/dd/yyyy')#">
    The system return this error:
    08/13/2007 is an invalid date or time string.
    I can use this method to record the date of parution of the
    News but cannot use it to put a vlue in the CFINPUT? This is not
    making any senses!

Maybe you are looking for