Oracle Form read Database

HI!
Does anybody know an example how to interact with a database with OForms? (show data edit data and so on)
thanx
Wolfgang

You can look at Forms samples and documentation at this url:
http://otn.oracle.com/sample_code/products/forms/content.html
Chandar

Similar Messages

  • Oracle forms commiting database blocks

    I have created a form with 4 database blocks. Fac_master is the main block, which has a not required FK to Fac_potential_cus. Fac_services which has a required FK to fac_master. fac_serv_locations which has a required FK to fac_services. I have put the relationships on the tables that have the PK related to a FK. I am able to insert the data into the form, but when I save the form. The current form's record only saves the data to fac_master. When I create a new form and save it, the current form's record for fac_master saves, but the previous form's record saves to fac_potential_cus and fac_services. Fac_services fk to fac_master does populate with the correct pk from fac_master. Which is causing the FK to not be put into fac_master for fac_potential_cus and fac_serv_locations data is not being put into the table at all because the FK to fac_services is null at the time it trys to put the current record data in itl.
    Can any give me any ideas why only the main datablock(fac_master) saves at the time the form is saved then the other datablocks(fac_services & fac_potential_cus) data saves from the previous record once a new record is saved in fac_master? The data in fac_services is one record behind fac_master and in sync.
    I am using a key_commit at form level. I put a libpack in there to make sure it is reading INSERT and it is. The sql in the key commit is:
    If :system.record_status = 'CHANGED' then
    SUBMIT_BUTTON;
    Elsif :system.record_status = 'INSERT' then
    Commit_Form;
    End if;
    Thanks.
    Edited by: 939341 on Jun 7, 2012 11:27 AM

    Welcome to the forum.
    Unfortunately you posted this question in the Database - General forum. Try posting in the Forms forum
    Forms

  • Oracle forms reading and writing

    Hi,i would like to know how to read a form and display the result using VC++. Please help me in this regard.

    Hi,i would like to know how to read a form and display the result using VC++. Please help me in this regard.

  • View pdf file stored in oracle database through oracle forms

    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.8.0 - Production
    Oracle Toolkit Version 10.1.2.0.2 (Production)
    PL/SQL Version 10.1.0.4.2 (Production)
    Oracle Procedure Builder V10.1.2.0.2 - Production
    PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
    Oracle Query Builder 10.1.2.0.2 - Production
    Oracle Virtual Graphics System Version 10.1.2.0.2 (Production)
    Oracle Tools GUI Utilities Version 10.1.2.0.2 (Production)
    Oracle Multimedia Version 10.1.2.0.2 (Production)
    Oracle Tools Integration Version 10.1.2.0.2 (Production)
    Oracle Tools Common Area Version 10.1.2.0.2
    Oracle CORE     10.1.0.4.0     Production
    I have created external directory and am able to load pdf files in oracle database table called test_blob.
    CREATE TABLE test_blob (
    id NUMBER(15)
    , file_name VARCHAR2(1000)
    , image BLOB
    , timestamp DATE
    I have 2 pdf files in the table. I want to view this pdf from forms when the user clicks on the button. On when-button-pressed trigger I want to show pdf on the screen. Any help is appreciated. Not on the designer. I want to run form application.
    SELECT id, file_name,
    DBMS_LOB.GETLENGTH(image) Length,
    timestamp
    FROM test_blob
    ID|FILE_NAME|LENGTH|TIMESTAMP
    1001|2011 HeartlandEmployeeReferralCard.pdf|353718|1/28/2013 11:44:41 AM
    1002|2011 HeartlandEmployeeReferralCard.pdf|353718|1/28/2013 11:51:07 AM
    Edited by: user_anumoses on Jan 28, 2013 11:45 AM

    We were able to do the same thing with Oracle Application Server and Oracle WebLogic Server. I cannot remember how different the processes were, but it seems like they were very similar. I am going to give you the instructions on how we implemented a "Read PDF" procedure on the WebLogic Server. If you are still on the Application Server you may have to do some Google searches, but it all boils down to the mod_plsql DAD Configuration file.
    Our PDF was located in a table with the following structure:
    CASE_DOCUMENTS
       (id_document                    NUMBER NOT NULL,
        doc_blob                       BLOB,
        note                           VARCHAR2(240),
        created_by                     VARCHAR2(20) NOT NULL,
        created_dt                     DATE NOT NULL,
        case_id                        NUMBER NOT NULL,
        filename                       VARCHAR2(100) NOT NULL)Based on that table structure we created a procedure named READ_PDF which you will reference below in the dads.conf file below:
    CREATE or REPLACE procedure read_pdf (p_id_document IN number)
    is
      view_file     blob;
    BEGIN
      select doc_blob
        into view_file
        from case_documents
       where id_document = p_id_document;
      OWA_UTIL.MIME_HEADER ('APPLICATION/PDF', FALSE);
      HTP.P ('CONTENT-LENGTH: ' || DBMS_LOB.GETLENGTH (view_file));
      OWA_UTIL.http_header_close;
      WPG_DOCLOAD.download_file (view_file);
    END;
    GRANT EXECUTE ON read_pdf TO financial_user_role  -- Name of role to execute
    /Basically, you are passing in one parameter and that is the primary key for your table. You are selecting the pdf stored in a BLOB for that primary key. The commands below that allow the pdf to open up so you can view it – we got this off some search we did a few years ago.
    Now, you need to add logic to your Oracle Form that will call the procedure above, but the URL is based on the dads.conf file that we will set up below… Anyway, we created a button on the form module with a label of "View". In the WHEN-BUTTON-PRESSED trigger the logic looks like this:
    -- The View logic uses the DAD (Database Access Descriptors) method to view a .pdf file from the form.
    -- The DAD was created on WebLogic Server  with the name findadgen.  This allows an http request be made
    -- to the database.
    declare
      v_file          varchar2(400);
      v_success       boolean;
      ret_val         number;
      v_http_link     varchar2(400);
    begin
      -- The format of the link is as follows: hostname:port/pls/DAD_name/procedure_name
      v_http_link := 'http://finas03:8888/pls/findadgen/read_pdf?p_id_document=' || :case_documents.id_document;
      web.show_document(v_http_link, '_BLANK');
    end;The name of our WebLogic Server is "finas03" so that is what is listed in the URL. The "findadgen" is the name of the <Location> in the dads.conf file below, the "read_pdf" is the name of the procedure we created above, the "p_id_document=" is the IN parameter listed in the READ_PDF procedure created above, and the ":case_documents.id_document" is the reference to the primary key in our Oracle Form.
    For WebLogic, you can either go through Enterprise Manager (directions below) or update the dads.conf file on the filesystem directly (if you update the dads.conf file directly then skip to step 4 and ignore step 5):
    1.     Enterprise Manager -> Web Tier -> ohs1
    2.     Oracle HTTP Server (pull-down) – Administration – Advance Configuration
    3.     Select File – dads.conf
    4.     Add something similar:
    # ============================================================================ 
    #                     mod_plsql DAD Configuration File                         
    # ============================================================================ 
    # 1. Please refer to dads.README for a description of this file                
    # ============================================================================  
    # Note: This file should typically be included in your plsql.conf file with 
    # the "include" directive. 
    # Hint: You can look at some sample DADs in the dads.README file 
    # ============================================================================
    <Location /pls/findadgen>
        SetHandler pls_handler
        Order allow,deny
        Allow from All
        AllowOverride None
        PlsqlDatabaseUsername financial
        PlsqlDatabasePassword sdo_3#d1
        PlsqlDatabaseConnectString ffindbTNSFormat
        PlsqlNLSLanguage AMERICAN_AMERICA.WE8ISO8859P1
        PlsqlAuthenticationMode Basic
        PlsqlDefaultPage read_pdf
    </Location>You are adding the <Location> section to your dads.conf file. The "finddadgen" is the name that you will reference in a change you fill make to your Oracle Form. The "financial" is the Schema, the "sdo_3#d1" is the password for that Schema, the "ffindb" is the database that the stored procedure is located on, and the "read_pdf" is a stored procedure you will have to create in order to read the pdf.
    5.     Press the "Apply" Button
    6.     Obfuscate the DAD password by running the dadTool.pl script located in $ORACLE_HOME/bin (This was done on Unix on our server with the following commands):
    $> LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
    $> cd $ORACLE_HOME/bin
    $> perl dadTool.pl -f /u01/app/oracle/middleware/asinst_1/config/OHS/ohs1/mod_plsql/dads.conf
    7.     Restart the Oracle HTTP Server using Fusion Middleware Control:
    Enterprise Manager -> Web Tier -> ohs1
    Oracle HTTP Server – Control – Shutdown
    Oracle HTTP Server – Control – Start Up
    If you followed the instructions above, you should have created a stored procedure, added logic to your Oracle form to reference that stored procedure, and created an entry in the dads.conf file. Once you move the form onto the server and you restart the HTTP Service, you should be able to view a pdf that is stored in a table directly from your Oracle Form.

  • In Oracle Forms 10g, what is the best approach in read an excel file (csv)?

    Hi All!
    Could someone please advise me on what is the best way for an oracle form reading and extracting data from an excel spreadsheet (csv) that is located in the local drive directory.
    Someone had already advised me to use TEXT_IO function or use a javabean through the Implementation Class property.
    I'd really appreciate it if someone can give me insights.
    Thanks! beeals

    Other approach to load a CSV file, you can use EXTERNAL TABLES. SQL Reference manual has examples.
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2095331
    [urlhttp://www.astral-consultancy.co.uk/cgi-bin/hunbug/doco.cgi?11210] simple example of external tables loading data into oracle
    or here
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:68212348056
    Regards
    Ros
    Message was edited by:
    Rosario Vigilante

  • Oracle form: how to retrieve data from database to pop list

    I have problem in retrieving data from database to item list in
    oracle forms.
    Can anyone help me.
    thanks.

    The next is an example but you can find this information in
    Forms Help:
    DECLARE
         G_DESCS RECORDGROUP;
         ERRCODE NUMBER;
         rg_id RECORDGROUP;
         rg_name VARCHAR2(40) := 'Descripciones';
    BEGIN
         rg_id := FIND_GROUP(rg_name);
         IF Id_Null(rg_id) THEN
         G_DESCS := Create_Group_From_Query (rg_name, 'SELECT
    DESCRIPCION DESCRIPCION, DESCRIPCION DESC2 FROM FORMAS_PAGO);
         ERRCODE := POPULATE_GROUP(G_DESCS);
         POPULATE_LIST('FORMAS_PAGO.CMBDESCRIPCION',G_DESCS);
         END IF;
    END;
    Saludos.
    Mauricio.

  • From an Oracle form, I want to read a text file.

    From an Oracle form, I want to read a text file. In the form on a button press I have:
    declare
    in_file Text_IO.File_Type;
    linebuf VARCHAR2(1800);
    filename VARCHAR2(30);
    BEGIN
    filename:=GET_FILE_NAME('U:\ora_devl\pps\work\a.txt', File_Filter=>'Text Files (*.txt)|*.txt|');
    in_file := Text_IO.Fopen(filename, 'r');
    LOOP
    Text_IO.Get_Line(in_file, linebuf);
    -- :text_item5:=:text_item5||linebuf||chr(10);
    Text_IO.New_Line;
    END LOOP;
    EXCEPTION
    WHEN no_data_found THEN
    Text_IO.Put_Line('Closing the file...');
    Text_IO.Fclose(in_file);
    END;
    It gets an ORA-302000. I suspect the problem starts with the GET_FILE_NAME because when I comment out everything but that, It processes endlessly never ending.
    Forms [32 Bit] Version 11.1.1.3.0 (Production)
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    What can you tell me? Thanks

    GET_FILE_NAME will try to open an "Open File" dialog on the server, which obviously can't happen. If you want to use that type of behavior you need to use WebUtil and the function CLIENT_GET_FILE_NAME. Example:
         filename := CLIENT_GET_FILE_NAME('C:\', File_Filter=> 'Text Files (*.txt)|*.txt|All Files (*.*)|*.*|', dialog_type=> OPEN_FILE);Refer to the Builder Online help for more details. You can also refer to the demo which is available here:
    http://www.oracle.com/technetwork/developer-tools/forms/downloads/index.html
    More information here:
    http://www.oracle.com/technetwork/developer-tools/forms/webutil-090641.html
    Also, it appears that you are attempting to use a mapped drive ("U"). Although this can be made to work, it is not recommended and in some cases will not be supported. If you need access to remote files, you should use some other mechanism to bring the file to the local machine before manipulating it.

  • How 2 invoke an oracle form from a database procedure?

    I have a procedure.When i run the procedure itt invokes an oracle form. This procedure is a database procedure.
    Is this possible? if possible how?

    I have the url to launch the forms application...
    can that url be invoked by a procedure?

  • How to show a long with database datablock in a small width frame using horizontal scrollbar in oracle forms

    Hello Experts,
                  I am new in oracle forms and  I am  using Oracle forms 11.1.2.2.0 with weblogic 10.3.6 generic at windows 7 64 bit.
    My java version is jdk1.7.0_51.
    I have a database table say as ITEM_MASTER.This table has 20 columns.Now I have to show these 20 columns in oracle form in a single frame.I have used the wizard method to make database block in oracle forms but This datablock takes too much width.
    I wand to show all the columns with in a short width frame in oracle forms using horizontal scroll bar.But I am unable to do this.Please suggest me.
    thank you
    regards
    aaditya.

    This can be accomplished using a Stacked Canvas.  There are numerous examples of how to use a stacked canvase on the web.  For example:  https://www.google.com/search?q=oracle+forms+how+to+use+a+stacked+canvas
    Craig...

  • Oracle forms 10g 32bit with Oracle 10g database on windows itanium for x64

    Hi.....
    Currently we are planning to have this configuration
    1. Oracle10g RAC on HP rx6600 with windows itanium for x64 architecture
    2. Oracle Application Server (32-bit) on windows 2003 (forms & reports services)
    3. Application migrated from 6i to 10g
    I have to things to ask about?
    1.Will it be ok to connect from an application compiled with _(32-bit)_ 10g forms to a x64_ platform without problems ?
    2. Can we connect forms and reports of developer 6i +(32-bit)+ to 10g RAC on x64_ platform if the character set is not UTF8 ?

    1.Will it be ok to connect from an application compiled with (32-bit) 10g forms to a x64 platform without problems ?I did this also. A 32bit Oracle Form(10gR2) on Linux and a 64 bit (10gR2) database. And this works without a problem. Since you didn't mentioned your versions I would suggest you look for your combination if it is certified combination.
    2. Can we connect forms and reports of developer 6i (32-bit) to 10g RAC on x64 platform if the character set is not UTF8 ?I don't know if the combination is certified. But regarding your character set, you have a character set setting (NLS_LANG, DEVELOPER_LANG, etc.. ) for your developer 6i, your database has it's own character set. Depending on those setting a conversion of the character set will take place between your developer 6i and the database, when you get and put data to the database. But like I said I don't know if developer 6i and 10g is still a supported combination.

  • Oracle Forms returns the first record in the database when performing query

    Once in a while when we query for a record on a form, say by first name Tom, then it returns the first record in the database. Other times it return the Tom's record. It only happens once in a while and if you close the form and reopen it and requery for Tom, then it brings Tom's record.
    Does anyone know the issue what could be happening. It just happens every now and then that it's hard to reproduce.
    ORacle Forms 10GR2
    ORacle Application Server 10.1.3
    thanks

    then it returns the first record in the databaseI'm not sure if i understand you correctly. Do you mean forms ignores the searc-condition you entered? I would check SYSTEM.LAST_QUERY at the moment this happens to check if the condition gets somehow lost.

  • Connecting database 11g to Oracle forms 6i.

    Hi guys,
    my previous question was:
    "Hi guys,
    basically, i am using the "run sql command line" from "Get Started With Oracle Database 11g Express Edition ". I have created a database within the command line and now am trying to open it Oracle forms 6i. I have set up the forms in the form builder but when i hit the green traffic light it asks me to log in. I type "system" for the username and then my password. (Not quite sure what the database bit should be. Someone told me XE). Anyway, apparently, you need to connect the sql command line or the sql database to oracle forms 6i. Can someone please tell me how i can link the database from the command line to oracle froms so i am able to log in. If there is anything technical such as "check a port number" or anything like that, can you tell me where i can locate it.
    Thanks in advance "
    Someone replied with:
    irst you have to configure TNSNAMES.ORA file
    copy the tns configuration from database to forms tns file.
    then create a user in data base and give connect and create access and create any table and then try to connect from forms.
    Can someone please tell me where to look for TNSNAMES.ORA file? where it can usuallly be located? or even what it should look like? i found one but i think it is the one for the forms but non for the database.
    Thanks

    TNSNAMES.ORA File Location
    for Forms 6
    C:\ORANT\NET80\ADMIN
    for forms 10g
    E:\DevSuiteHome_1\NETWORK\ADMIN
    for database 11g
    D:\oracle11g\product\11.2.0\dbhome_1\NETWORK\ADMIN
    note that oracle database 11g does't have compatibility to connect with forms 6 version.
    forms 6 version is limited upto 10g database versions.

  • Oracle Forms 6i client/server against an Oracle 10gR2 database

    Hello
    We have the following situation:
    Oracle Forms6i/Reports6i client server application against an Oracle 8i cost-based database. we want to migrate this application
    step 1:
    Migrate the database to 10gr2, but do not touch the client application
    Go live
    step 2:
    Migrate the development environment to 6i webforms.
    Production environment stays client server.
    With this construction we can still create new patches/functionality.
    step 3:
    Migrate to Forms10gR2 (and reports)
    I know Forms 6i is not supported anymore.
    My question is on step 1.
    When I read NOTE: 338513.1 entitled "Is Forms/Reports 6i Certified To Work Against Oracle Server 10g Rel 1, Rel 2 or 11g?" carefully
    it says that Forms 6i is not certified against 10gR2.
    On OTN I read several posts that this works ok (assuming you do not use the wrong character set).
    I also read on OTN that patch 18 (which is only supported for EBS customers) is certified against 10gR2.
    The questions:
    - Is Oracle Forms patch 18 certified against an Oracle 10gR2 database? (or only for EBS)
    - Is there anybody out there that can confirm that Oracle Forms 6i C/S works against Oracle 10gR2
    Regards Erik

    Thank you.
    Now I found it.
    But how do I read that page.
    It says:
    Client Certifications
    OS      Product      Server Status
    XP      6.0.8.27.0 Patch 18      N/A      Desupported
    Application Tier Certifications
    OS      Product      Server      Status      
    XP      6.0.8.27.0 Patch 18      9.2      Desupported
    XP      6.0.8.27.0 Patch 18      10g      Desupported
    I read this as follows:
    Patch 18 was certified agains a 10g database in a webforms environment.
    No client server mentioned and Server 10g , so no 10gR2!
    I'm I right?
    Regards Erik

  • Cannot connect to database using Oracle Forms 10g

    hi,
    I had installed Oracle 10g database and Oracle Forms 10g on Windows Vista Home Basic. However, I was unable to connect to
    the database in Oracle Form using scott/scott for database "orcl", with the following error message:
    ORA-00604: error occured at recursive SQL level 1
    ORA-01009: missing mandatory parameter
    However, I could access to the database using this set of username and password. Am I missing something? Thanks.

    Hi,
         After a successful installation of forms 10g in vista, I'm about to run OPatch Universal Installer for the patch 7047034
    in order to fix the form bugs. However, I cannot run the command "opatch apply C:\oracle_form\Patch26_Rel_10105\7047034"
    with the error "The Oracle Home c:\devsuitehome_1 is not registered with the Central Inventory.". Then I try to create a
    oraInst.loc file, but not much change still. The situation is that oracle 10g is installed before oracle developer suite
    10g, and when I try to set oracle_home to oracle 10g's path ("C:\oracle\product\10.2.0\db_1") and run "opatch lsinventory",
    it returns the correct result; when oracle developer suite 10g's path ("c:\devsuitehome_1") is set as the oracle_home,
    the same command would return a different result as "LsInventory: OPatch Exception while accessing O2O".
         I've verified through Oracle Universal Installer that the Central Inventory has included both as oracle_home (oracle 10g
    and oracle developer suite 10g). I'm very confused now, though it seems that the problem could be solved by registering the
    Central Inventory with oraacle developer suite 10g's path. Thanks.

  • We want to read data from weigh bridge and display in oracle forms & store

    Sir/Madam,
    in our organisation we had one requirement. i.e is reading data from weigh bridge using serial port, displying that data in oracle forms and when ever user click save button we store that into my oracle database. we are using oracle 8i and forms 6i and windows OS environment. we don't know reading data from serial port and placing that into form items. please help me as early as possible if there is any property available in d2k regarding this requirement .
    thank you,
    vishnu

    There's no property in Forms that makes you read serial ports, but as far as I know you need to know the API of the machine which you want to read data from (it should come with machine's manual) and then it will be easy to store it in forms item.
    Tony

Maybe you are looking for

  • Connecting 80 gig I-pod to t.v.

    My video is in black and white and also the vertical hold is running. This occurs when I am using a regular T.V. When I connect to a Phillips plasma, I receive only audio. I would appreciate any help. Thank-You.

  • Reporting problems

    Hi. Why is there no way to report problems regarding the BIOS to HP? I hope HP makes some kind of contact line to which custmers can report problems or errors regarding the BIOS or the hardware. Does HP think it can find every problem? Or, does HP wa

  • Export field symbol table out of method

    Hi, i have a report, that takes any xml and converts it into a table structure. In a method I generate the table structure using method cl_alv_table_create=>create_dynamic_table. Later in the same method I have filled the content of the XML file into

  • ALE and IDCO message types

    Hi all, pls tel me types of message type available in ale and idocs with definition and segment types,idoc type....etc.

  • SAP NetWeaver - Business Programming Java

    Hi. I am new to SAP and see that NetWeaver has three branches. Can anyone please tell me if I were to follow the <a href="https://websmp204.sap-ag.de/~sapidp/011000358700003123382006">SAP NetWeaver - Business Programming Java</a> branch, what type of