How to reference or use a database procedure in a form

I have a database procedure(any database object in the form) Pls tell me how to reference it in the form
I will appreciate if I can get an example.

Hi,
if its in the same schema you are connected to, just call it by packagename.procedure from a Plsql program unit or trigger. Make sure you don't have a procedure with teh same name defined in Forms itslef.
Frank

Similar Messages

  • How to call database procedure in oracle forms

    Hi,
    Can anyone describe me that how I'll call database procedure in oracle forms (6i,10g)?
    Thanks in Advance.
    Baloch

    Hi Francois,
    As I created a procedure in database as below
    create or replace procedure For_table (tbl_of in number,st_pnt in number,en_pnt in number) is
    begin
    for i in st_pnt..en_pnt loop
    dbms_output.put_line(tbl_of||'*'||i||'='||tbl_of*i);
    end loop;
    end For_table;
    The above procedure is working fine when I'm using PL/SQL. I call the above procedure as
    begin
    For_table(3,5,20);
    end;
    but nothing happen
    Thanks in Advance.
    Baloch

  • How to retrieve data using logical database and custom select options

    Hi all,
    I have a selection screen which is displayed by logical database PSJ and I have two select options of my own. I need to retrieve data based on both selection screen of logical database and my own select options. How can I do it?
    Thanks in advance.

    Hai Gupta
    Check the following Document & Links
    1. A logical database is in fact
    a program only.
    2. This LDB provides two main things :
    a) a pre-defined selection screen
    which handles all user inputs and validations
    b) pre defined set of data
    based upon the user selection.
    3. So we dont have to worry about from
    which tables to fetch data.
    4. Moreover, this LDB Program,
    handles all user-authorisations
    and is efficient in all respects.
    5. tcode is SLDB
    good info about Logical Database. you can check the link.
    http://www.geekinterview.com/question_details/1506
    http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
    Re: How to Create and Use ldb in reports?
    Re: Logical databases
    http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
    Functions for displaying and changing logical databases:
    Call Transaction SE36 or
    Choose ABAP Workbench -> Development -> Programming environ. -> Logical databases
    Interaction between database program and report:
    During program processing, subroutines are performed in the database program and events are executed in the report.
    To read data from a database tables we use logical database.
    A logical database provides read-only access to a group of related tables to an ABAP/4 program.
    advantages:-
    The programmer need not worry about the primary key for each table.Because Logical database knows how the different tables relate to each other,and can issue the SELECT command with proper where clause to retrieve the data.
    i)An easy-to-use standard user interface.
    ii)check functions which check that user input is complete,correct,and plausible.
    iii)meaningful data selection.
    iv)central authorization checks for database accesses.
    v)good read access performance while retaining the hierarchical data view determined by the application logic.
    disadvantages:-
    i)If you donot specify a logical database in the program attributes,the GET events never occur.
    ii)There is no ENDGET command,so the code block associated with an event ends with the next event
    statement (such as another GET or an END-OF-SELECTION).
    1. transaction code SLDB.
    2.enter name z<ldb-name>
    3.create
    4.short text
    5.create
    6. name of root node (here Ekko)
    7. enter short text (f6)
    8.node type -> data base table.
    9.create
    10 change logical DB
    riht click on ekko and insert node
    here node name ekpo
    11.create
    12. click on selections
    13. press no Should the changed structure of Z<ldb name> be saved first.
    14.select tables which you want to join.
    15.transfer
    16 now you have to o to coding part.
    17. save
    activate.
    19.click to src code
    double click on first include and activate
    Regards
    Sreeni

  • How to run database procedure in oracle form

    Hi,
    I have created a database procedure, it run successfully at server side, but I need to run it on oracle form, how I'll do ?
    Thanks
    Baloch

    Baloch,
    Essentially, you call your database stored procedure the same way in Forms as you do in SQL Plus. The difference is that you need to call the procedure in a Forms Trigger versus a SQLPLus prompt. The Forms user must have execute privileges to the stored procedure as well. The Forms trigger depends on when and where you need the procedure to run. For example, if you need the procedure run in conjunction with a button pressed in your form, you would code your When-Button-Pressed trigger to call the stored procedure. If the db user is different fro.m the Forms user, make sure you fully qualify the call to the procedure.
    Here is a small code sample to demonstrate:
    /* Sample When-Button-Pressed trigger */
    BEGIN
       IF <Condition is true> THEN
          /* Call Database procedure */
          SCHEMA.PROCEDURE_NAME(<any procedure parameters here>);
       END IF;
    END;This is a very basic example, but it should make the concept clear. ;)
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.
    Edited by: CraigB on Jul 22, 2010 10:57 AM
    Edited by: CraigB on Jul 22, 2010 11:02 AM
    Edited by: CraigB on Jul 22, 2010 11:04 AM
    Edited by: CraigB on Jul 22, 2010 11:04 AM

  • Database procedure called from Forms

    If a database procedure that updates a table is called from Oracle Forms, does it commit the changes automatically or do you have to issue a commit in Forms to commit the changes the database procedure has done, assumming there is no commits in the database procedure.
    I'm not sure since I have seen cases where a commit was needed after the database procedure has been called and a case where a commit was needed. I checked the database procedure and there was no commits, there was a commit above the statement where the procedure was being called.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by NAB ():
    If a database procedure that updates a table is called from Oracle Forms, does it commit the changes automatically or do you have to issue a commit in Forms to commit the changes the database procedure has done, assumming there is no commits in the database procedure.
    I'm not sure since I have seen cases where a commit was needed after the database procedure has been called and a case where a commit was needed. I checked the database procedure and there was no commits, there was a commit above the statement where the procedure was being called.<HR></BLOCKQUOTE>
    Database procedure do have commit. You can issue commit in the procedure itself.
    null

  • How can let oc4j use my database schema file?

    I wrote a mysql.xml in config\database-schemas.
    But when I deploy a ejb application, It reported:
    2005-2-20 4:11:03 com.evermind.server.Application getDatabaseSchema
    Warning: Exception occurred getting database schema. Exception: java.sql.
    SQLException: Can't call commit when autocommit=true
    2005-2-20 4:11:04 com.evermind.server.Application getDatabaseSchema
    Warning: Warning: Exception occurred getting database schema. Exception: java.sql.
    SQLException: Can't call commit when autocommit=true
    05/02/20 04:11:05 Auto-deploying - compiling and loading...
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -deprecation for details.
    05/02/20 04:11:22
    Auto-creating table: create table Student_ejb1_ejb1 (id BIGINT not null primary
    key, name SET(255) null)
    05/02/20 04:11:22 Error creating table: You have an error in your SQL syntax; ch
    eck the manual that corresponds to your MySQL server version for the right syntax....
    Do I need write schema property in data-sources.xml?

    To the data-sources.xml configuration file add a datasource element for MySQL. In the schema attribute set the schema file to database-schemas/mysql.xml.
    <data-source
        class="com.mysql.jdbc.jdbc2.optional.MysqlDatasource"
        name="OracleDS”
        schema="database-schemas/mysql.xml"
        location="jdbc/mySQLCoreDS"
        xa-location="jdbc/xa/mySQLXADS"
        ejb-location="jdbc/mySQLDS"
        connection-driver="com.mysql.jdbc.Driver"
        username=""
        password="”
        url="jdbc:mysql://localhost/test"
        />   

  • How do I correctly use Macro Builder to have a form auto select a TAB depending on a value selected in a combo box?

    I am working in access 2013 to update a database first created in Access 2003. It has been saved as an accdb but I have the same problem in earlier versions.
    I have a Tab Control subform in my MainDataEntry form which has 5 different tabs. Each Tab has its own set of text boxes and combo boxes for data entry. At the top of the MainDataEntry form there is a Text box [Text393], which has a drop down with
    the 5 TAB names, [Mobile Device],[Computer],[Loose Media],[Network] and [Original Device]. When I select one of these values in the Text box, I would like to automatically set focus on the first Textbox or ComboBox inside the corresponding TAB.
    I have tried to do this using the MacroBuilder inside the "After Update" Property for the Text or Combo box that is on the MainDataEntry Form using "If" and "Else If" statements for the "GoToControl" action, however
    I seem to be able to only get one Tab to work. I have tried several different variations of this, putting the If statement first and the action argument second...putting all arguments inside a group, or not grouped....nothing seems to work. What am I
    doing wrong?
    EXAMPLE:
    If [Text393]=[Mobile Device] Then
        GoToControl
             Control Name   Combo471
    Else If [Text393]=[Computer] Then
        GoToControl
    Control Name   Bios_Date
    Else If [Text393]=[Loose Media] Then
        GoToControl
             Control Name   Combo659
    Else If [Text393]=[Network] Then
        GoToControl
             Control Name   User Name
    Else If [Text393]=[Original Device] Then
        GoToControl
             Control Name   Combo814
    End If

    In the Macro Builder's AfterUpdate event for [Text393]:
    GoTo Control
      Control Name =Forms!MainDataEntry.Controls(Text393.Value).Name
    To ensure that the first control on each tab receives the focus, set that control's Tab Index property to zero (0).

  • How to generate PDF using FDF file and the PDF form template (PHP)

    Hi Folks,
    I'm really sorry that I couldn't follow all the valuable discussions going on here, regularly. I need some immediate help.
    I NEED A PHP SOLUTION. I'm able to generate FDF files using the PDF Form Template in PHP. So, I have a collection of FDF files, which seeks the PDF template, while opened and populates the template with FDF data. Now if I need to save this PDF file, I have to do it manually clicking SAVE option. But, I need to convert FDF to PDF in bulk. So, I need some PHP based solution. The PHP script takes the PDF template and the FDF file and merges them to generate a complete populated PDF file. I know it's possible, but don't know how. I've seen Adobe FDF Toolkit. But by default it doesn't show any guideline for PHP. Please help me to write this code. I'm a professional coder. I can understand your hints and tutorials. PLEASE HELP GOOD PEOPLE.

    The only reason I am responding to this post is because the poster sent me a request through the forum message system asking for my help.
    Although I did populate PDFs with FDF data generated by web forms a year or so ago, I have since abandoned that kind of solution. It was a big headache. I found it far more stable and flexible to use html, php and css to populate forms that are almost as nice looking as PDFs.
    So my advice is, if you can possibly avoid going the FDF/PDF route, you will be better off.

  • Using blobsin database and ole in forms ,reports

    Dear forum ,
    I have one thread to you, its stopping me from moving forward.
    I am using forms 6i ,reports 6i ,db above 9i.
    I had created database table haveing one blob column ,used the column in form as ole object and inserted a record contains (opened ms office excel sheet ,i need some part of rows columns matrix copied -it contains data taken) copied in forms runtime and saved.
    And the same table used in oracle reports the column as ole column, generated the output to pdf ,or word .
    the inserted records -bolob images are not retriveing or not shown in generated file can be pdf or word or html ?
    what is the reason.
    can you help me the proceeding.
    Thanks & Regards ,
    Deviprasad.m

    I don't think its possible to include a word-doc or a pdf stored in a blob in a report. A blob in reports can be used to show an image, like a jpg or gif.
    Edited by: Andreas Weiden on 11.07.2010 14:11

  • How to reference source table in procedure?

    I created a procedure with only 1 sql statement:
    delete * from source_table_name@connector where ...
    I put this procedure in pre-mapping, then validate, pre-deploy are both ok, but when I deployed it, it caused "cannot find table or view" error.
    How to reference source table in the procedure? Thanks.

    anybody helps??? Please.
    Thanks.

  • Database procedure error

    Hi everyone,
    I have form which has two database procedures in key commit trigger. If any error occurs while executing the second database procedure
    I dont want to save the form and first database procedure values. Can anyone please tell me how to pass the database procedure error to
    form so that it can stop the saving of form and first database procedure .
    Thanks in advance for any reply.

    Dear all,
    Thanks for your kind reply.
    I have tried using DBMS_ERROR_CODE in ON-ERROR trigger. My code appears like this.
    create or replace procedure_name(parmeters) as --- This is a database procedure;
    begin
    procedure_body;
    exception
    when others then
    Raise_application_error(-20025,'Error Message');
    end;
    In form in ON_ERROR trigger I have declared like this:
    IF DBMS_ERROR_CODE = -20025 THEN      
    MESG('Error in Insertion');
    Raise form_trigger_failure;
    END IF;
    I am not getting error message that I declared in ON_ERROR trigger instead I am getting error message from raise_application_error statement.
    Could anyone please guide me exactly how to catch the database procedure in form level so that I can stop exceution of the form.

  • Show the result of execution of a database procedure

    Hi everyone,
    I want to execute an oracle database procedure in oracle forms environment and show the result of execution to user(as "procedure executed successfully".. etc) How can I achieve this ?
    Thanks..

    That would depend on the implementation of your procedure. I would say if there is no exception thrown then the procedure completed successfully. Of course there might be some additional conditions when you consider your procedure run successful.
    So in the end you have to design your procedure so the caller can recognize if the procedure run successful or not. How you want to do this is up to you; you can use user defined exceptions (raise_application_error) if an error in your logic occurs which is not a default oracle exceptions, functions which return booleans or output stati.
    I for one prefer exceptions, as they force the caller to handle them (I add the user-defined exceptions thrown by each procedure in the specification right to the documentation so the one using my procedure sees it right away) and ensure my procedure is atomic.
    But as said this is entirely up to you.
    cheers

  • Oracle error while using an stored procedure in forms

    Hi all,
    I used a stored procedure in a form,and it worked well.Recently i just update this procedure by desactivate some codes lines.The stored proc is well compile but when i try to use it in a form module, the following Oracle error occurs:
    ORA-04020     deadlock detected while trying to lock object name
    Cause:     While trying to lock a library object, a deadlock is detected.
    If some one have a solution to this problem, plz react to this topic
    TYAG.

    Hi all,
    I used a stored procedure in a form,and it worked well.Recently i just update this procedure by desactivate some codes lines.The stored proc is well compile but when i try to use it in a form module, the following Oracle error occurs:
    ORA-04020 deadlock detected while trying to lock object name
    Cause: While trying to lock a library object, a deadlock is detected.
    If some one have a solution to this problem, plz react to this topic
    TYAG.

  • How can I use two database in Dataset in SSRS?

    Hi,
    I am using one query to generate my SSRS report. In that query I am using subquery. Now I am pulling data from multiple tales.
    DB used in sub query is different than the rest of the tables DB.(So total I am using 2 DB(Database))
    So I see that in SSRS, I can connect query(In DataSet Properties) to one DATA_SOURCE only, how can I use other database which is I used in sub-query?
    I have to move this SSRS into PROD and I can't hard code that sub-query's DB name in my query.
    Please give me suggestion. Thanks!!
    Vicky

    In SSRS 2008 R2 you can use the Lookup function (http://technet.microsoft.com/en-us/library/ee210531.aspx ) and LookupSet function (http://technet.microsoft.com/en-us/library/ee240819.aspx
    Depending on your security set up, you can reference a table in a second database on the same server using a three part name:  database.schema.table.  This is more likely to work for you if you wrap your SQL command in a stored procedure.
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

  • How to check if column_ name is used by any procedure ,package ,function

    Hello
    Help Is greatly appreciated .
    Kindly please let me know for the folllwoing:
    How to check if column_ name is used by any procedure ,package ,function ,trigger or in any dataabse objects

    >
    How to check if column_ name is used by any procedure ,package ,function ,trigger or in any dataabse objects
    >
    In general you can't. Code can always exist outside the database and it is always possible that you have dynamic code and there is no way to find references like that if used by dynamic code. That dynamic code reference could be based on a query stored in a table.
    And there is no way of knowing if external code (e.g. a Java app) references that column.
    Another issue is that a column could exist in multiple schemas and in multiple objects of different types in those schemas. So a global DB search for 'MY_COLUMN' might turn up references in multiple schemas and you may only care about one schema.
    Unfortunately a reference to 'MY_COLUMN' in code could refer to many different objects or to an object in different schemas so how would you resolve those? Especially if you take synonyms into account which can ponit about anywhere.
    Why don't you tell us what it is you are really trying to do?
    Are you trying to find the references to a particular column? Why? Are you planning on removing/renaming the column? If so then the simplest way is to remove/rename the column and see what objects become invalid. Those invalid objects will have become invalid because that column is no longer available.
    As suggested you can use DBA_SOURCE for references in code that use the standard names. But for tables/views you need to use all_tab_columns. And for dynamic code or client code (e.g. a Java application) there is no way.

Maybe you are looking for

  • Iphone 6 home button (touch) not working

    This is Abbas from Pakistan. Two weeks ago my friend bought iphone 6 (64GB) for me from USA . I started it, when it reached to touch id it was unresponsive so I skipped it. Everything is going fine except the Home Button (Touch Button), its not detec

  • How to compile many forms in a HP-UX

    Hi, to compile a form i use f60gen module userid but this work for one form at a time i would like to generate for all form in a script

  • SPECIAL1 user defined Trigger not firing in Forms

    Hi All forms Gurus, I have a need of creating a menu under tools in forms and call another from from this new menu option. I have done the below: on my block I have written a PRE-BLOCK Trigger with the below code: app_special.instantiate('SPECIAL1',

  • No of Packages (PackQty) problem

    Dear All, I am facing problem in No. of Packages (PackQty) in delivery, while copied to A/R Invoice. I gets converted equivelent to quantity. eg If I have entered 20 pkg and 4350 qty in delivery, these are appeared as 4350 pkg and 4350 qty in A/R Inv

  • Production Order Operations System Status

    Hello Friends, I want to include Production order operations status in customized report. Can you pls suggest me how to fetch Operations status since I am unable to find the same from any of the Production Order Operation table (AFVC, AFRU, AFVU, AFR