call a procedure of package DB type complicated if the type defined in the package itself
Hello world
I use jdev 11.1.1.7.0
I defined a package of data with a procedure and internal two types as follows:
Create Or Replace Package Db_Package As Type rec Is Record(Rec_Type Varchar2(10), Rec_Desc varchar2(10) ); Type recordList Is Table Of rec; Procedure Test_Procedure(p_out out recordList); END db_package;
evil
I want to call this procedure in the module of the application. I know how to call a procedure or function db AM,
but in this case that I've defined two types in the package itself and I use one of these types as to the procedure output parameter, I had a problem.
below is the example of code to call the db procedure, but it does not work because the plsqlBlock.registerOutParameter () setting will not
CallableStatement plsqlBlock = null; String statement = "Begin DB_PACKAGE.Test_Procedure(:1); END;"; try { plsqlBlock = getDBTransaction().createCallableStatement(statement, 0); plsqlBlock.registerOutParameter(1, OracleTypes.ARRAY);// it doesn't work plsqlBlock.executeUpdate(); Object object = plsqlBlock.getObject(1); } catch (Exception e) { e.printStackTrace(); }
I know that if I set the types of packets (rec, recordList) as types of oracle (instead of setting in the packaging itself) so I can call the procedure with success, in this case I should use below:
plsqlBlock.registerOutParameter(1, OracleTypes.ARRAY,"Recordlist");
but I wonder how you can call a procedure from the package if the types defined in the package itself.
Kind regards
Habib
JDBC supports the types of oracle level package only from 12 c database and jdbc driver ojdbc7 (which requires java 7).
Dario
Tags: Java
Similar Questions
-
Calling a procedure of package with only Date setting
Hi all
Please, help me to call a procedure of package with Date from the sql command prompt parameter.
ArifCheck the procedure below.
SQL> ed Wrote file afiedt.buf 1 create or replace procedure procdate (p_date_in date) 2 is 3 p_date_out date; 4 begin 5 p_date_out := add_months(p_date_in,6); 6 dbms_output.put_line(p_date_out); 7* end; SQL> / Procedure created. SQL> exec procdate('01-JAN-2010'); 01-JUL-10 PL/SQL procedure successfully completed. SQL> exec procdate(to_date('01/01/2010','DD-MM-YYYY')); 01-JUL-10 PL/SQL procedure successfully completed. SQL> exec procdate('31-DEC-2010'); 30-JUN-11 PL/SQL procedure successfully completed.
-
Hello
I need help to call a procedure within a package.
I have an ABC package in which I have 3 X Y and Z I procedures I need to call the procedure procedure Y X that belongs to the same package.
Thanks in advance
I have an ABC package in which I have 3 X Y and Z I procedures I need to call the procedure procedure Y X that belongs to the same package.
This forum, as the title suggests, is for developer Sql questions only and NOT for questions of SQL or PL/SQL.
If this is not related to Sql Developer then please mark ANSWERED and repost it in SQL and PL/SQL forum
https://community.Oracle.com/community/Developer/English/oracle_database/sql_and_pl_sql
During the validation you must provide your name and full version.
You must also explain why even need help because procedure X can call just procedure Y directly since they are in the same package.
For an Oracle DB, see documentation and examples of ' packages of PL/SQL to help "in the doc of the PL/SQL language
http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28370/packages.htm#CIHIJECJ
-
calling a procedure in a db trigger
Hello
This select Quantity MAX selected and returned by a procedure or statement must be added to the accumulated item_qty newCREATE OR REPLACE PROCEDURE Balance_quantity_update(V_STORE_ID IN NUMBER, V_ITEM_SERIAL IN NUMBER) IS BEGIN UPDATE WH_T_ITEMS A SET BALANCE_QTY = ITEM_QTY WHERE STORE_ID = V_STORE_ID AND ITEM_SERIAL = V_ITEM_SERIAL AND ITEM_QTY = (SELECT MAX(ITEM_QTY) FROM WH_T_ITEMS B WHERE A.STORE_ID = B.STORE_ID AND A.ITEM_SERIAL = B.ITEM_SERIAL); END; /
How can I call this procedure in a db trigger
After posting the current or: new.item_qty in the subsequent update & post_insert - what
is this correct... ?CREATE OR REPLACE TRIGGER Balance_quantity_update AFTER UPDATE ON WH_T_ITEMS FOR EACH ROW V_BALANCE_QTY NUMBER (17,5); BEGIN V_BALANCE_QTY :=Balance_quantity_update(V_STORE_ID IN NUMBER, V_ITEM_SERIAL IN NUMBER) ; -- WHAT should i put here as a parameter :NEW.BALANCE_QTY := :OLD.BALANCE_QTY + V_BALANCE_QTY ; END; /
in your constraint list, as far as I can see it, the combination of transaction-series, of the base and point-set id must be unique. assuming that the different transaction date also means different transactions-series, this should be possible. Maybe you check the name of the constraint violated with the ORA-00001 and then make sure that the columns that are in this constraint.
-
How to pass the value of the element where to call a procedure
Hello
I tried to display an image blob by calling a procedure
It's working if I hardcode the parameter, for example < img src = "#OWNER # .download_my_file?" P_ID = 1 & p_picture = 1' height = 60 width = 40 line >
But if I pass the value with values of point page p_id < img src = "#OWNER # .download_my_file?" "p_id =: P_ITEM_ID & p_picture = 1 ' height = 60 width = 40 line >
the image appears... Is there something wrong with my syntax?
Thank you
VincentTry
Scott
-
call sub procedure for updating the table - need help
Hi all
I have a scneario wherein I get three values 0,2.5 and 57.
For each value, I'll call another procedure that updates a table "sample_dest".
The "sample_dest" table has a column "dest_nbr."
Now, for each three values I get,
I want to update only one record in the table 'sample_dest '.
for example, I want to update the column "dest_nbr" with a value of 59.5 (0 + 2.5 + 57).
I am unable to do this, because every time the procedure is called,
the previous values are not stored. 57 is the last value I get,
I am able to store only 57. But I want 59.5 to be updated in the table.
How can I achieve this.
Help, please.
Concerning
Rambeau.This should be done in a single sql statement, not in a loop of cursor (which is what it looks like you're doing). If sample_desc already contains records for samples, so it should look like:
UPDATE sample_desc sdesc SET desc = (SELECT AVG(code) FROM sample_dest sdest WHERE sdesc.sample = sdest.sample) WHERE EXISTS (SELECT 1 FROM sample_dest sdest WHERE sdesc.sample = sdest.sample)
If sample_desc does not already contain records (unknown from your description), then it would be an insert as:
INSERT INTO sample_desc SELECT sample, AVG(code) FROM sample_dest sdest GROUP BY sample
John
-
Updated APEX collection error ORA-04044: procedure, function, package, type
Hi all
I am trying to update the APEX MEMBER of the COLLECTION and encounter errors:
1 error has occurred
ORA-06550: line 9, column 8: PL/SQL: ORA-04044: procedure, function, package or type is not allowed here ORA-06550: line 7, column 3: PL/SQL: statement ignored
The PLSQL code are as below
DECLARE
entire x;
v_date_started VARCHAR2 (255);
v_date_finished VARCHAR2 (255);
BEGIN
SELECT c.seq_id
X
OF APEX_COLLECTION c
WHERE collection_name = "PHASE_COLLECTION."
AND c001 =: P41_MPM_ID
and rownum = 1;
v_date_started: =: P41_DATE_STARTED;
v_date_finished: =: P41_DATE_FINISHED;
APEX_COLLECTION. () UPDATE_MEMBER
p_collection_name = > 'PHASE_COLLECTION '.
, p_seq = > x
, p_c004 = > v_date_started
, P_c005 = > v_date_finished
);
END;
The process will take place after SUBMIT and validation.
The code I used to add a colletion APEX will work perfectly and is as below
-Initialization Collection PHASE_COLLECTION
BEGIN
IF THIS ISN'T APEX_COLLECTION. COLLECTION_EXISTS('PHASE_COLLECTION') THEN
APEX_COLLECTION. CREATE_COLLECTION ('PHASE_COLLECTION');
ON THE OTHER
APEX_COLLECTION. TRUNCATE_COLLECTION ('PHASE_COLLECTION');
END IF;
-Add members to the COLLECTION PHASE of table PHASE_MEMBERSHIP
IF: P41_MPM_ENG_ID IS NOT NULL THEN
FOR x IN (SELECT mpm_id, mpm_eng_id, phase_number, date_started, date_finished, date_created
OF phase_membership
WHERE mpm_eng_id =: P41_MPM_ENG_ID
AND active = 1
ORDER BY date_created)
LOOP
APEX_COLLECTION. ADD_MEMBER
(p_collection_name = > 'PHASE_COLLECTION')
, p_c001 = > x.MPM_ID
, p_c002 = > x.MPM_ENG_ID
, p_c003 = > x.PHASE_NUMBER
, p_c004 = > x.DATE_STARTED
, p_c005 = > x.DATE_FINISHED
, p_c006 = > x.DATE_CREATED
);
END LOOP;
END IF;
EXCEPTION
WHILE OTHERS THEN
Logger.Error (p_message_text = > SQLERRM)
, p_message_code = > SQLCODE
, p_stack_trace = > dbms_utility.format_error_backtrace
);
LIFT;
END;
What I tried to use APEX_COLLETION to check the overlap between the date_range.
The requirement is just to display a warning if the user adds a record to the new phase or update record of current phase may overlap between the order of phase together.
Table PHASE_MEMBERSHIP script is
CREATE TABLE 'PHASE_MEMBERSHIP '.
(
ACTIVATE THE "MPM_ID" NUMBER NOT NULL,
ACTIVATE THE "MPM_ENG_ID" NUMBER NOT NULL,
ACTIVATE THE "PHASE_NUMBER" NUMBER (2.0) NOT NULL,
"DATE_STARTED" DATE NOT NULL ACTIVATE.
DATE OF THE "DATE_FINISHED."
'NOTES' VARCHAR2 (2000 BYTE),
'DATE_CREATED' DATE NOT NULL ACTIVATE.
ACTIVATE THE 'CREATED_BY' VARCHAR2 (20 BYTE) NOT NULL,
NUMBER (2.0) 'ACTIVE' DEFAULT 1 ACTIVATE NOT NULL)
So, basically, I want to fill the documents associated with a particular to a collection of APEX called PHASE_COLLECTION MPM_ENG_ID.
Then when the user specify date_started and date_finished, it will update/insert the APEX collection first.
Then the rank based on audit collection date
http://www.Oracle-base.com/articles/Misc/overlapping-date-ranges.php
then display the warning to ask the user to confirm message.
But then I'm stuck at the step of updating COLLECTION of APEX.
If anyone has any ideas on what is wrong, please help.
Thanks in advance.
AnnYour syntx error line number should give you the trick - it is not a member of the update, rather the SQL - you are referring to apex_collection, not apex_collections view dictionary.
Scott
-
ORA-06508, procedure cannot call the procedure of package
I have a large stored procedure that calls a package (procedure) that manages a number of procedures to determine whether the process can continue or not. (It checks authorization of the student to enroll in a class). We have a web process calling the stored procedure, and that works fine. What does not work, is a call to the package. Oracle returned ORA-06508: PL? SQL: could not find program unit called.
I have included instructions for debugging, so I know that it is the specific call to a procedure in the package fails with ORA-06508. Thinking it's perhaps something in the package, I inserted a debug statement as the first line in the procedure called in the package. (Debugging instructions call a procedure inserts of rows in a table of debugging with independent validation).
When I log in the user account with sqlplus and run a test, everything works fine. But when the web process is running under the same user, the process fails to call the procedure of package and fails with ORA-06508.
It seems as if the web process runs with the rights of the appellant, or a role is not granted.
Can someone help me understand what the problem is?
offered hv, I appreciate your comments.
We solved the problem: remove the package that couldn't be cited, then re-create. That's all!
Apparently, something in the database was tangled upward. The server recently had problems with disk space, then it might have been related to that. But we'll never know for sure.
The stored procedure and packaging (procedures) which he called were owned by the same schema, and there is no mechanism that I can find to prevent one of the other appellant. But that was the case - Oracle threw the ORA-06508 exception when the stored procedure called the package procedure.
I replaced the stored procedure and package several times fine-tuning debugging code, but this has not fixed the problem.
Finally let it drop and then re-create the package, it's which solved the problem.
Regarding requests to view the code, there is no way that I could reproduce the problem, since the error that occurred was against the permissions and rules which packages run and the procedures of the Oracle. Thanks for all the tips and suggestions.
-
calling a procedure with nested table as input param type
Hello
I have a guy like that table.
create or replace type table_type like table of the varchar2 (4000);
I have a procedure like this.
proc_temp (v_table_type, table_type)
Start
key code...
end;
I have a table like this.tab_test_data
--------------------
ABCD
efghd
MNOP
XYXX
I want to move this data in table tab_test_data as param of entry while calling this proc could you please tell me how the procedure that calls the statement will be the writtern.
I try like this.
----------------------------
declare
TABLE_TYPE v_table;
Start
proce_temp (v_table); - here, I want to pass data to the table as entry
end;
/
You already have the data in a table (tab_test_data), then why don't you just use the table inside the proce_temp? Why should I set a collection type and pass it as a parameter? Collections use the expensive PGA memory. If the application that you build this way may have some serious scalability issues.
Sort of a technical solution would be like this. You can use BULK COLLECT.
declare
TABLE_TYPE v_table;
Start
Select to bulk column_name fired in v_table
of tab_test_data;proce_temp (v_table);
end;
/ -
call procedure: wrong number or types of arguments in the call getHour
Hello, everybody, when I call a procedure like this: call getHour ('2009-1-1 ',' 2009-12-31'), and it not show that: the following error has occurred:
ORA-06553: PLS-306: wrong number or types of arguments in the call to "GETHOUR '...
And the procedure as follows: Please help me to find the mistakes, thanks a lot! Please, I beg you!
create or replace procedure (getHour)
sDate in date,
eDate to date,
oHour number
)
as
number of pNum;
number of wNum;
mDate date;
number of mNum;
wStr tank (3);
l_num NUMBER;
l_date DATE;
l_str VARCHAR2 (20);
Start
Select count (*) in the l_num of vacation where cdate > = cdate and to_date(sDate,'yyyy-mm-dd') < = to_date(eDate,'yyyy-mm-dd');
oHour: = pNum;
loop
Select to_date (sDate, 'yyyy-mm-dd') + 1 in double l_date;
If to_date(mDate,'yyyy-mm-dd') > to_date(eDate,'yyyy-mm-dd') then
"exit";
on the other
Select to_char (to_date (mDate, 'yyyy-mm-dd'), 'dy') in the double l_str; / * get week string * /.
If wStr = 'sat' or wStr = "Sun" then
Select count (*) in the l_num of workingday where cdate = to_date(mDate,'yyyy-mm-dd'); / * * /
If mNum = 0 then
oHour: = oHour + 1;
end if;
end if;
end if;
end loop;
oHour: = oHour * 8.5;
end;Hello
Sorry, I missed the:(il faut le déclarer.) output parameter
Example:
DECLARE v_sDate VARCHAR2(10) := '2009-01-01'; v_eDate VARCHAR2(10) := '2009-12-31'; v_oHour NUMBER; BEGIN getHour(sDate => v_sDate, eDate => v_eDate, oHour => v_oHour); END;
Kind regards
Published by: Walter Fernández on March 5, 2009 12:24 AM
-
Call Oracle procedure with variable
Experts,
I pass arguments through script to Oracle procedure, use the input value and pass to the procedure.
Oracle procedure Gets the input value, run the query, and all connect to the log file.
I am facing a few challenges, seems to be the error of syntax or data type
1. even if I pass all the script parameter still run complains of wrong number or type of arguments.
There are three numbers followed by a date variable
2. how to pass a variable value with the INTERVAL function, it should take the value of the variable lThird for example "" AND date > = date + INTERVAL '30' MINUTE; "but somehow, after trying different variants still get error like interavl not valid."
3 see someone more changes to this?
$1 = 10;
$2 = 30;
3 = $50
$4 = '20150113';
echo "Oracle procedure in progress"
(
set linesize 100
pkg.proc exec ($1, $2, $3, $4);
) > $logFile
If [$? == 0]
then
EXIT_VAL = 0
= Package/oracle procedure =.
CREATE or REPLACE PACKAGE pkg
AS
procedure proc (lFirst in number,
lSecond in numbers
lThird in numbers
date IN oven,
curReturn to sys_refcursor);
Pkg of END;
/
CREATE or REPLACE PACKAGE pkg BODY
AS
PROCEDURE proc (lFirst in number,
lSecond in numbers
lThird in numbers
date IN oven,
curReturn ON sys_refcursor)
IS
BEGIN
OPEN FOR CurReturn
SELECT date,
emp_id,
first name,
last_name
Employees
WHERE Emp_id in (lFirst, lSecond)
Date AND > = date + MINUTE INTERVAL "(lThird)"
AND date = TO_DATE (oven, 'YYYYMMDD')-1;
END proc;
Pkg of END;
/
Error:
PLS-306: wrong number or types of argument in the call to proc
Hello
With regard to your needs:
My current problem is
1. how to store the SELECT results in the log file, ask has several columns with multiple lines
2. what happens when SELECT brings out no line?
I have re-used, corrected and adapted to your procedure:
Package:
CREATE or REPLACE PACKAGE pkg
AS
PROCEDURE proc (lFirst in number,
lSecond in numbers
lThird IN varchar2,
curReturn to sys_refcursor);
Pkg of END;
/
CREATE or REPLACE PACKAGE pkg BODY
AS
PROCEDURE proc (lFirst in number,
lSecond in numbers
lThird IN varchar2,
curReturn ON sys_refcursor)
IS
BEGIN
OPEN FOR CurReturn
SELECT *.
WCP
WHERE empno in (lFirst, lSecond)
AND hiredate > = TO_DATE (lThird, 'YYYYMMDD');
END proc;
Pkg of END;
/
Shell script: test_sql.sh
#! / bin/ksh
V_user = scott
V_pass = Tiger
echo "Oracle procedure in progress"
Req ='sqlplus-s $V_user / $V_pass<>
var refcursor rc
exec pkg.proc ($1, $2, $3,: rc)
print the rc
output
EXPRESSIONS OF FOLKLORE"
echo "$req" > logfile$ $
PS:
(1) you must put the name of your user/passwd name and table (I used the scott/tiger schema by default with emp table). This is just to show how to retrieve a refcursor output in a script.
(2) I used logfile$ $ as output file; You can use any other file or method name to redirect the output to a file
Call us at:
19000101 7934 7900 test_sql.sh
PS: As noted in the previous posts, you cannot define a VARIABLE of type DATE in sqlplus (or a Unix script); You can send a string and perform the conversion in the SQL section.
If no line is not recovered, you get the following in the log file:
PL/SQL procedure successfully completed. no rows selected
HTH.
-
How to move the functions and procedures of packages in a schema?
Hello
I have less than the needs for a work at home and my question is if anyone can point me in the right direction to find documentation that can help me solve below. Any information will be appreciated. Thank you.
Write procedures and functions (included or not in packets) as .txt or .sql scripts. Once they have been launched in Developer SQL they should, in addition, the functions and procedures of packages in the current schema. If the current schema contains only 2 packages, pac1 (p11, p12 procedures and functions f11, f12, f13) and pac2 (contains the p21 following procedures, p22, p23 and f21 and functions f21 (case of overload), running the scripts produce the following effects:)
- Procedures p11, p12, p21, p22, p23, and f11, f12 and f13 functions will be created in the current schema.
- PAC2 will contain 2 instances of the function of overload-f21; they will be kept in the package, without be created in the current schema. If all overloaded procedures/functions will be kept in their original packaging
- If pac1 contains variables, cursors, and public types, keep us only the details of the package (and remove the body); usually if the packages contain no overloaded functions or procedures the body will be removed and if no variable, cursors, types of public then we will remove the header.
- If in the triggers, procedures and functions we will call procedures/functions packages (procedures and functions moved into the current schema) they reference will need to be updated (via editing the body or recompilation) for example if pa1.p12 will be replaced with p12.
- Scripts must have numbers in the next series (01... n) and the characters that explain the content.
My only advice would be to remember that these are public forums and if YOU can find them, therefore cannot your instructors.
In addition, those are horrible procedure names and function
This mission seems to be around to overload the pl/sql objects and... prioritize a research on Oracle documentation around overhead and legacy
http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28371/adobjplsql.htm#i21148 -
Hi all
How to call the procedure using CALL with the data type of parameter directory?
for example, there are a DBMS_FGA procedure. ADD_POLICY with these settings:
and I call this statement:PROCEDURE ADD_POLICY Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- OBJECT_SCHEMA VARCHAR2 IN DEFAULT OBJECT_NAME VARCHAR2 IN POLICY_NAME VARCHAR2 IN AUDIT_COLUMN_OPTS BINARY_INTEGER IN DEFAULT
It works
But this one does not work for me: (.) I have only to add the AUDIT_COLUMN_OPTS parameter with the type of directory data.CALL DBMS_FGA.ADD_POLICY(POLICY_NAME => 'POL1',OBJECT_SCHEMA => 'USER1',OBJECT_NAME => 'TABLE1');
I know that I can use BEGIN... END or EXECUTE in sqlplus, however I have to test it by using the CALL. If possible, it would be much easier for me to appeal through my code in PHP.CALL DBMS_FGA.ADD_POLICY(POLICY_NAME => 'POL1',OBJECT_SCHEMA => 'USER1',OBJECT_NAME => 'TABLE1',AUDIT_COLUMN_OPTS => DBMS_FGA.ALL_COLUMNS); ERROR at line 1: ORA-06553: PLS-221: 'ALL_COLUMNS' is not a procedure or is undefined
Oracle version: 11 GR 2
Any help would be appreciated.
Thank you
Yusata.
Published by: Yusata on June 18, 2012 04:57CALL is SQL statement. Therefore, you cannot reference package variables directly. And DBMS_FGA. ALL_COLUMNS is a global package variable. One way to do it is of DBMS_FGA. ALL_COLUMNS value:
SQL> set serveroutput on SQL> exec dbms_output.put_line(DBMS_FGA.ALL_COLUMNS); 1 PL/SQL procedure successfully completed. SQL>
Now, you can:
DIAL THE DBMS_FGA. ADD_POLICY (POLICY_NAME-online 'POL1', OBJECT_SCHEMA => "USER1", OBJECT_NAME-online 'TABLE1', AUDIT_COLUMN_OPTS-online 1);
Or, if you're worried value could change in future versions, you can create a getter function:
CREATE OR REPLACE FUNCTION GET_DBMS_FGA_ALL_COLUMNS RETURN NUMBER IS BEGIN RETURN DBMS_FGA.ALL_COLUMNS; END; /
However, you grant run on DBMS_FGA to the owner of the function directly, without going through the role. Now, you can:
DIAL THE DBMS_FGA. ADD_POLICY (POLICY_NAME-online 'POL1', OBJECT_SCHEMA => "USER1", OBJECT_NAME 'TABLE1', AUDIT_COLUMN_OPTS-online GET_DBMS_FGA_ALL_COLUMNS =>)
);
SY.
-
Call a procedure only once for the last place of the trigger FOR EACH ROW
Hello world
I wonder if someone could help me in the execution of the trigger. My use case what follows:
-a trigger after each INSERT or UPDATE operation;
-use FOR EACH ROW algorithm for relaxation;
-collect certain values inserted/updated fields as: new.uuid and store in a set defined on the layer of the package;
-only for the last inserted/updated line call a procedure from the global collection with the values collected as a parameter;
Is it possible to be implemented for the type of the LINE FOR EACH of the trigger? Fact one: new identifier or trigger itself have special attributes such as COUNTY, SIZE to set a size of data inserted or changed to conditional logic? Is there another solution to possible workaround for thoughtful use cases.
Thank you
AndreyHi, Andrey,
I suggest you use 2 triggers:
(1) A FOR EACH ROW trigger, as you described, to collect relevant data and store it in a temporary table overall or variable poackage. Whenever the trigger is activated, it will overwrite all the data from the previous row.
(2) AFTER ( NOT FOR EACH ROW) trigger that calls the procedure by using the saved data. -
NullPointerException when calling stored procedure
I have the stored procedure
create or replace PROCEDURE GREETING_PROC
(
TEXT_PARAM IN VARCHAR2
MSG_TEXT VARCHAR2 OUT
) AS
BEGIN
MSG_TEXT: = "Hello" | TEXT_PARAM;
END;
My stored procedure call method
public class UserBean {}
public UserBean() {}
Super();
}
Public Shared Sub main (String [] args) {}
UserBean userBean = new UserBean();
userBean.callP ();
userBean.callStoreProcedure ();
}
public void callStoreProcedure() {}
CallableStatement st = null;
SysUser SysUserEOImpl = new SysUserEOImpl();
try {}
String sql = "BEGIN GREETING_PROC (: TEXT_PARAM,: MSG_TEXT); END; « ;
St = sysUser.getDBTransaction () .createCallableStatement (sql, sysUser.getDBTransaction (). DEFAULT VALUE);
st.setObject ("TEXT_PARAM", "Scoot");
st.registerOutParameter ("MSG_TEXT", Types.VARCHAR);
St.Execute ();
System.out.println ((String) St.GetObject ("MSG_TEXT"));
} catch (SQLException e) {}
throw new Aexception.getLocalizedMessage (e);
}
}
then I got an exception:
Exception in thread "main" java.lang.NullPointerException
at cic.opsi.model.bean.UserBean.callStoreProcedure(UserBean.java:35)
at cic.opsi.model.bean.UserBean.main(UserBean.java:27)
Hello
What statemet is UserBean.java:35)?
Second, create a new SysUserEOImpl()!
If you want to call stored proc, put the java code calling stored proc in ViewRowImpl/ViewObjectImpl/ApplicationModuleImpl and export this code in the customer interface. Then put this method in the pageDef as
a call him as an OperationBinding Zeeshan Baig blog: the PL/SQL procedure call and function in the Oracle ADF application
Extending the functionality of the components Business
ADF/OFA for Oracle Techies: ADF call stored procedure with Out parameters
Latest Oracle technology: call Store procedures for Oracle ADF Application
Maybe you are looking for
-
413 request Entity too large (history)
I started having a sync error that won't go away. When I watched the news I've seen a lot of mistakes in the post. So the first thing I tried was to blow everything since I've been using the synchronization of the former. Then configure the new sync
-
BOOK TYPES and SIZES AVAILABLE in the PHOTOS HELP
Can I create and order a big Paperback (8.5 "x 11") using Photos for Mac? I created more than 16 books such as the use of iPhoto, but this paperback size is not listed as available in Photos thank you for your response.
-
Satellite P10-304 - the card WiFi mini pci can add?
Hello I have a Satellite P10-304.I would like to add a mini PCI Wireless.Can someone tell me one would suit this machine. Thank you
-
Installation of Windows server 2008 on Poweredge R320
Hello everyone We bought a new Poweredge R320 server in order to install 64-bit Windows Server R2. There are 2 drives inside and they are preconfgured as raid1. I changed the configuration of SATA in RAID mode and also initialized by PERC-H310 RAID1
-
I need help in visual studio 2012 express
so Hello everyone, yesterday I downloaded visual studio 2012 express that I'm going to make a game for windows desktop, so when I opened it on purpose and tried to do a project, I could not find the directx create projects, I already downloaded the D