Execute store procedure from form
How do I execute a store procedure from FORM
I have a store procedure in the database
all it does insert a value to table test.
in 'WHEN-NEW-INSTANT-TRIGGER' of the form MODLUE I put
test_curor; (name of the store procedure)
The module does have block or any thing it.
There was no syntax errors or form error
but it did not insert into the table.
Why????
I just tested this myself and you are right. If you have one block with no items in it the when-new-form-instance trigger will not be fired. I got a message back saying 'block had no items', though it ran OK. This kinda makes logical sense, since there is nothing for the form to do. I put a button onto the block and the procedure fired no problem. I must admit I have never tried creating a form with no items in it so I haven't seen this behaviour before.
Shucks you live and learn every day!
Similar Messages
-
Execute Store procedure from derived table
I would like to create a devired table to use in the LOV for my prompt. Can I execute a store procedure in the defintion of the derived table instead of a sql statement ? My store procedure is in a sql 2008 database
Derived Table and SP are not the same. Derived table is more like a database view and is not a replacement for SP. I'd suggest you to use Derived table only if it is not possible to create a database table/view.
Is it necessary for you to use your stored procedure as a data source? Are you trying to join it's result set to another table or view?
You can create Materialized view in the database. Use that as a table in Universe.
Try to use this object LOV in your prompt. -
Dear all,
i want to execute a procedure from forms. my code is below for calling procedure, this code is working fine from the SQLPLUS, but not working from forms.
forms_ddl('execute audit_sessions('||''''||'et20'||''''||',sysdate,'||''''||'HELP'||''''||')');my procedure is below
CREATE OR REPLACE PROCEDURE audit_sessions(uname varchar2,logon_date date,APP_USER VARCHAR2) is
begin
insert into admin.session_audit values(uname,logon_date,APP_USER);
commit;
end;my table is below
SQL> desc session_audit
Name Null? Type
ACTIVE_DIRECTORY_USER VARCHAR2(30)
LOGON_TIME NOT NULL DATE
APPLICATION_USER NOT NULL VARCHAR2(30)kindly help. i am using oracle 10g database and forms version 9.0.4.0.19
Regards.
Edited by: Maahjoor on 09-Feb-2013 19:34
Edited by: Maahjoor on 09-Feb-2013 19:35
Edited by: Maahjoor on 09-Feb-2013 20:18Wa Alaikum Salam,
Dear Ahmad Rafiq,
it is compiled without error, so i think it should work, but now currently the forms is opened by some user,
as soon as i am able to delete the old one and paste the current one, i will update you and will mark the answer correct accordingly.
thank you so much dear. -
HOW CAN I EXECUTE DINAMIC SENTENCES FROM FORMS
HOW CAN I EXECUTE DYNAMIC SENTENCES FROM FORMS.
Ex.
I would like to execute this commands from table SENTENCES
COL1
set_item_property (item1, enabled , property_true )
set_item_property (item2, enabled , property_true )
set_item_property (item3, enabled , property_false )
Regards
Message was edited by:
jcruizcarrera
Message was edited by:
jcruizcarrera... but you could imagine a sort of workaround...
PROCEDURE Set_Item
PC$Item In Varchar2
,PN$Property In Number
,PC$Value In Varchar2
) IS
BEGIN
Set_Item_Property( PC$Item, PN$Property, PC$Value ) ;
END;That you can call like this:
Set_Item( 'BL.BUTTON', LABEL, 'Hello' ) ;Francois -
How to call Pl/sql procedure from form ?
Hi all,
I need to call a procedure from form after the user has pressed the button to invoke the sql procedure, can anyone please advise me on how to do it ?
Thanks.
LimHi,
Thanks for your reply.
yes, I have include in when-button-pressed trigger as
AIC_PROC_AR_CCID_UPD;
Below is my procedure :-
CREATE OR REPLACE PROCEDURE AIC_PROC_AR_CCID_UPD(errbuf out Varchar2,
retcode out Number ) is
VAR_BUF VARCHAR2(240);
Cursor C1 is
SELECT CONCATENATED_SEGMENTS ACCT,
SEGMENT5 SEG5
FROM AIC_GL_COA AGC
WHERE AGC.CODE_COMBINATION_ID IS NULL;
Rec1 C1%RowType;
BEGIN
FOR Rec1 IN C1 LOOP
BEGIN
UPDATE AIC_GL_COA A SET ( DESCRIPTION, CODE_COMBINATION_ID, SEGMENT5 )=
( SELECT FFVT.DESCRIPTION, GLA.CODE_COMBINATION_ID, GLA.SEGMENT5
FROM GL_CODE_COMBINATIONS_KFV GLA,
FND_FLEX_VALUES_TL FFVT,
FND_FLEX_VALUES FFV
WHERE GLA.CONCATENATED_SEGMENTS = REC1.ACCT
AND FFV.FLEX_VALUE = REC1.SEG5
AND FFV.FLEX_VALUE_ID = FFVT.FLEX_VALUE_ID
AND FFV.FLEX_VALUE_SET_ID = 1002673 )
WHERE A.SEGMENT5 = REC1.SEG5 ;
EXCEPTION
WHEN NO_DATA_FOUND THEN
FND_FILE.PUT_LINE(FND_FILE.OUTPUT, 'NO RECORD UPDATE !!');
END;
END LOOP;
COMMIT;
RETURN;
END;
However, when I try to compile it, error prompt :-
Error 306 at line 1, column 1
wrong number or types of arguments in call to 'AIC_PROC_AR_CCID_UPD'
Error 0 at line 1, column 1
statement ignored.
By the way, my form 6i is running at client site and connection to procedure in unix server. Will this is ok ?
Thanks
Rgds
Lim -
Executing Stored procedure from host file
Hi all,
I am trying to execute a procedure from a host file.I don't know where I am doing wrong but the procedure is not executing.
#!/bin/bash
echo "*********************** Initializing Global Variables ***********************"
export CONNECT_STRING=$1
export START_TIME=`date +%m/%d/%Y:%H%M`
#export DATE_FROM=`date +%m/%d/%Y:%H%M`
#export DATE_TO=`date +%m/%d/%Y:%H%M`
DATE_FROM=$5
DATE_TO=$6
sqlplus -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S ${CONNECT_STRING} <<EOF
WHENEVER SQLERROR EXIT FAILURE
set echo off
execute xxjy_extract_ar_transactions.main_preinterface('$DATE_FROM','$DATE_TO');
EOF
echo "From Date is $DATE_FROM"
echo "To Date is $DATE_TO" In my log i can see the From Date is 1-Jan-2013 and To date is 28-Feb-2013 which are my input parameters to concurrent program.But I don't understand why my procedure is not getting called.
Please advice.
Thanks,
SandeepPlease post the details of the application release, database version and OS.
Is the issue with this specific host concurrent program?
Did you follow the steps in these docs?
How to Register a Host Concurrent Program in Applications [ID 156636.1]
How To Create A Custom Concurrent Program With Host Method and Pass Parameters To The Shell Script [ID 266268.1]
How Do You Run A Unix Host Script From Concurrent Managers On MS Windows Platform? [ID 412392.1]
How To Setup A Custom Concurrent Host Program [ID 147455.1]What is the reason of using more than one "-S" in the sqlplus command?
Please enable trace and generate the TKPROF file to find out what is happening when you kick off this concurrent program?
FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12 [ID 296559.1]
How To Trace a Concurrent Request And Generate TKPROF File [ID 453527.1]
Thanks,
Hussein -
Call Stored Procedure from Forms 6i -- Urgent Plz...
Dear All,
I am first writing a stored procedure as:-
CREATE OR REPLACE FUNCTION
good_hire
(birthdate_in IN DATE,
reqsal_in IN NUMBER)
RETURN BOOLEAN
IS
too_young BOOLEAN :=
ADD_MONTHS
(SYSDATE, -216) >
birthdate_in;
too_expensive BOOLEAN :=
reqsal_in > fin.dept_bal;
BEGIN
RETURN NOT (too_young
OR too_expensive);
END;
Now in my forms also i have the same function,which i defined in in my program unit i.e., with the same name good_hire,but with different parameters.
If I want to call this stored procedure(good_hire)in my form
I am writing this code in the pre-Insert trigger.
IF good_hire
(:newemp.birthdate,
:newemp.proposed_sal)
THEN
SELECT empseq.NEXTVAL
INTO :newemp.empno
FROM dual;
ELSE
RAISE FORM_TRIGGER_FAILURE;
END IF;
Notice that i am sending bind variables from my form to the
stored procedure. Now my question :
1) Can i pass bind variables to the stored procedures from
forms or is there any other way i can access the
stored roceures from forms(Expecting a detailed answer) and
from which triggers can I access the stored procedures(like pre-
Insert here)?
2) If at all I have the same parameters in my program unit
function and with the same name good_hire, I know that the code
in the pre-Insert trigger will call only the function in my
program unit and not the stored procedure, but if I like to
call my stored procedure instead of the local function good_hire
then what should I do?
2)As I said before if i have different parameters, for the
stored procedure good_hire and local function good_hire and If
I call good_hire from my pre-insert trigger .. Is it that the
Forms will decide and call the Local function or stored
procedure depending on the parameter list?
I hope all my points are very clear.
I am expecting the best and detailed answer for my
Queries, I also hope these Quests will clear the doubts of many
members in our esteemed group.
Thnx in Advance...
Regards
siree....Dear Siree,
Oh!! how many Questions? Each how much big??
Ok First of all the answer to your first question.
You can use the Stored procedures in the same way as the Forms procedures. You can pass bind variables to the stored procedures as well. You can also use the stored procedures in any triggers, I think there are no restrictions for that. The only thing is you should be connected to database while compiling the trigger where you are calling the stored procedure.
Answer to your second question.
You cannot direct Forms (I don't know about version 10g), untill 9i, you cannot tell forms to take the stored procedure and leave the local procedure. It will always take the local procedure, once a procedure is called. If not found locally then only it will go for the Stored procedures.
For your third question.
As I told you b4 forms searches for the procedure being called locally first, if locally present, does not go to the stored procedure. If declared by different paramaters in the stored procedure and it is called, then it will throw error (as it first searches for the name locally and if found will take up the one present locally and since that procedure is with different parameter, will throw up error). It is after all a stupid machine and can't think like us.
Regards,
Senthil .A. Perumal -
Calling Oracle store procedure from Crystal 11 command
I need to call Oracle store procedure from Crystal Command. The Store proc has ref cursor. Is it possible. Can you post few examples?
Also, is it possible to have multiple sql statements in a Crystal Command, when working with Oracle 10g?
It is working for SQL server.Please re-post if this is still an issue to the Data Connectivity - Crystal Reports Forum or purchase a case and have a dedicated support engineer work with you directly.
-
Problem with IN OUT parameters whiloe calling procedure from Form 6i
Hi
Could some help please? I have the following scenario.
I am calling a stored procedure from form 6i by pressing a button on the form. Procedure has two IN OUT parameters, and I am passing these two IN OUT parameters and have declared them the way they are declared passed to the procedure. But I get an error when calling that procedure with these IN OUT parameters. the procedure works fine if parameters are IN only. The error says:
PLS:00363: Expression '1' cannot be used as an assigment target.
NO matter I pass some value or leave it blank, I get the same error message persistenetly.
Please help.
Thanksmake sure you are calling your procedure with variables as parameters,
i.e.
l_v1 := 1 ;
l_v2 := 'hello world' ;
your_proc(l_v1, l_v2)
not
your_proc(1,'hello world') -
Execute oracle procedure from SSIS
is it possible to execute Oracle procedure from within SSIS?
thanksHi,
I used
begin
test1;
end;
and it is giving - SSIS package "Package.dtsx" finished: Success, but it is not doing anything.
"test1" procedure has couple of insert statements and a commit statements but the package is not inserting anything.
Also when I use "exec test1;" it is failing with the error mentinoed here in the forum.
Any idea what is wrong here? -
How to execute a procedure from BODI?
Hi Pals ,
I have procedure in my database say EMP_PROC. I want to execute this procedure from the BODI environment.Please do let me know.
Thanks in advance.
Regards,
Dirasyou have to import the stored procedure in the datastore
and after importing you can call the stored procedure in the mapping
use import by name option in datastore, and select function in type and enter the name of stored proc that you want to use in DI
check technical manual for more details on importing functions and stored procedure -
Execute Stored Procedures from Stellent
Can we execute stored procedures from stellent 7.5.2 ?
By using java, I dont find any method to execute stored procedure from WorkSpace interface.
Please guide me to solve this..
Appreciate your help and efforts.May not be exactly what you're looking for, but I hope this helps:
http://www.corecontentonly.com/Blog/Calling-A-Stored-Procedure-From-Oracle-Fusion-ECM-Stellent
For java based execution basically:
1. Create your stored proc in the db
2. Create a component
3. Create a query resource
4. In your java code use the createResultSet method of the Workspace object and pass in the name of your query resource and then the current databinder object -
APEX_MAIL.SEND() not seen executing MY procedure from TOAD
Hi,
I have a procedure that calls APEX_MAIL.SEND and works fine when executed from within the app or in the APEX Workshop window.
Trying to execute MY procedure from an Oracle job we get an error unknown procedure APEX_MAIL.SEND
anyone have this problem?Hello,
Why don't you use utl_smtp package if you are wanting to send email from pl/sql?
If you look at the help for APEX_MAIL its says:
APEX_MAIL
You can use the APEX_MAIL package to send an email from an Oracle Application Express application. This package is built on top of the Oracle supplied UTL_SMTP package. Because of this dependence, the UTL_SMTP package must be installed and functioning in order to use APEX_MAIL.
So APEX_MAIL will only work within a valid apex session and it won't be available to a toad session .
Cheers,
Paul. -
Execute ORACLE STORE PROCEDURE from DATABASE
Hi Everyone...
i have a store procedure, it has a 5 params, 3 are IN parameters and 2 left are OUT parameters, I need execute this store procedure using a SQL Intruction like this
DECLARE integracion_sia_kac PROCEDURE FOR KACTUS.SP_SIAKAC_NMDHODO
:ll_horario,
:ll_ide_doc,
:ls_con_kac,
@PINDREGI=:ls_ind_registro output, @PVALERRO=:ls_error_int output
USING gt_kactus;
i think this function is using from MSSQL Server, this has a three IN params but the declaration of the OUT params I don't understand.
HELP ME!!!!!.... I need know way to execute the SP
ThanksWell it is very simple!
example:
CREATE OR REPLACE PROCEDURE PROC1 (P1 IN NUMBER, P2 IN NUMBER, P3 OUT NUMBER) IS
BEGIN
P3 := P1 + P2;
END;
This is how to use PROC1 from, say, PROC2 :
CREATE OR REPLACE PROCEDURE SomeShema.PROC2 IS
Var1 NUMBER(15,2);
Var2 NUMBER(15,2);
ReturnParamFromPROC1 NUMBER(15,2);
BEGIN
Select SomeField INTO Var1 from Table1 where Table1.ID = 10;
Select SomeField INTO Var2 from Table2 where Table2.ID = 20;
PROC1(Var1, Var2, ReturnParamFromPROC1);
DBMS_OUTPUT.PUT_LINE('Returned value from PROC1 is : '||ReturnParamFromPROC1);
END; -
Error when calling procedure from form personalization
Hi every body
I want to call a procudre using form personalization . I made the procedure and in form personalization i call it as follow:
built in type : Execute a Procedure
Argument :
='GAZ_EMP_ASSIGN_UPDATE(' || :ASSGT.ORGANIZATION_ID || ', ' || :ASSGT.ASSIGNMENT_ID || ', ' || FND_PROFILE.VALUE('USER_ID') || ', ' || FND_PROFILE.VALUE('DB_SESSION_ID') ||' )'
but the following error raised when i click on Apply Now button :
the string (='GAZ_EMP_ASSIGN_UPDATE(' || :ASSGT.ORGANIZATION_ID || ', ' || :ASSGT.ASSIGNMENT_ID || ', ' || FND_PROFILE.VALUE('USER_ID') || ', ' || FND_PROFILE.VALUE('DB_SESSION_ID') ||' )' )
couldn't be evaluated because of error ORA-06550 :line 1 , column 43
PLS-00103:encountered the symbol ")" while expecting one of the folowing (- + ...... etc
can anyone have a solution to this problem because it made me mad .(urgent)
Or if anyone have another way to call the procedure ??
Note that i want to pass db_session_id to the procedure from the application so does anyone have a complian about the way of passing this parameter to the procedure ??See http://oracle.ittoolbox.com/groups/technical-functional/oracle-apps-l/forms-personalization-execute-a-procedure-1778674
Maybe you are looking for
-
How do you import an Aperture 2 library to Aperture 3?
I have been using Aperture 3 since it came out, but now I have an old client who says they never received their images from 2 years ago. (I know, now they tell me). Those images are living inside an Aperture 2 vault and nowhere else. The vault is
-
Links not working correctly in PCUI for CRM
Hi All, We are implementing mySAP CRM 4.0 through PCUI on Portal EP6 SP14. I have integrated the CRM Business Package 60.2 in Portal. Proper User has been created in the backend and assigned Sales Manager Role both in the portal and in the CRM backen
-
Hi! Gurus Can you please let me know the name of the Jar/library file containing com.sap.aii.messaging.adapter.Conversion package. Your help is greatly appreciated!! Thank you, Patrick
-
Deployment issue of webcenter portal application
Hi, While deploying webcenter portal application I am getting below exception: Caused By: java.lang.ClassNotFoundException: oracle.webcenter.lifecycle.listener.FeatureMetricApplicationListener This is what I did: 1. Created a separate schema using we
-
DBM_GETF error by entering tcode DB13
Hello! I am facing with the following error, even when I enter the tcode db13. (I have SAP Solution Manager 4.0 installed on Windows, with the latest patches and kernel patch, my SAPDB-version is 7.6) Name and Server : <SID> - servername DBMRFC