How to call a pl/sql procedure to an event handler in NetBeans IDE
I want to call a procedure from a button click event handler in NetBeans and also pass a parameter to the procedure. How I have here a this?
Wrong forum!
This question belonged to a NetBeans forum.
Please mark the thread ANSWERED and repost in a forum for details.
Tags: Java
Similar Questions
-
Call the PL/SQL procedure with in out parameter of OIC clob
Hello
For a few days, I am facing a problem. I have to call the pl/sql procedure with colb parameter out. I use c ++ and OIC (don't ask me why :)).
I use a pl/sql problem test procedure:
create or replace function Test (longField outside clob) return number is
Number of result;
Start
longField: = 'prefix ';
Result: = 12;
Return (result);
end Test;
So I do all the stuff with the connection to the DB,
I prepare the statement: "start: res: = test(:param); end; »
So I OCIHandleAlloc (m_pCtx-> hpEnv,
(void *) & m_hpStatement,.
OCI_HTYPE_STMT,
0,
(NULL);
and
OCIStmtPrepare (m_hpStatement,
m_pCtx-> hpErr,
(...),
(...),
OCI_NTV_SYNTAX,
OCI_DEFAULT);
Before the binding I prepare parameters. For a clob I devote to the lob Locator:
OCIDescriptorAlloc ((dvoid *) m_pCtx-> hpEnv, (dvoid *) & m_pLobLocator,)
(ub4) OCI_DTYPE_LOB (size_t) 0, (dvoid *) 0);
OCILobEnableBuffering (m_pCtx-> hpContext, m_pCtx-> hpErr, (OCILobLocator *) m_pLobLocator);
that I bind parameters using OCIBindByName and OCIStmtExecute statement execution.
I get an error
---------------------------
Microsoft Visual C++
---------------------------
Unhandled exception in... (ORAOCIEI11. (DLL): 0xC0000005: Access Violation.
My question is: is it possible to call the pl/sql procedure with parameter BEAK clob?
If Yes, what steps I need to do to succeed?
Thank you for your response.Hello
Of course, it is possible :)
Show that you are your piece of code that is binding.
Are you sure you had correctly the lob descriptor in the call to bind? -
How to call the PL/SQL of EntityImpl procedure
Hello
I have a page that can create/update visitors. When a new customer is created themselves, a line gets inserted into the database table. I use EO for this feature.
I need to create lines to two or three other table also when a new line is created in the main table. What is the best practice for this feature?
The 2 options that I know:
1 create a trigger on the main table and the appeal of trigger for inserting rows in other tables.
2. call a PL/SQL of EntityImpl procedure after the permanent data is committed to the table. (If this is the best approach, could you please let me know how to get there)
See you soon
AJ
In fact, Java Mail API is included in WLS and JDev, then you can simply add %MIDDLEWARE_HOME%\Oracle_Home\oracle_common\modules\javax.mail_2.0.0.0_1-4-4.jar to your project.
Dario
-
How to expose a pl/sql procedure via slot shape of apex
Hi gurus
I have a form that is create from a procedure.
I put the auth to pubic_user if it is available to the public.
So now I need is to know how to find a way to imitate the button submit and draw the corresponding URL
while I can expose my PL/SQL via a URL through apex procedure.
I have attached a screenshot of my form
Thx for all the help.
Here's the URL of my pl/sql
https://Apex.Oracle.com/pls/Apex/f?p=30141:1:5404118417577:
and I look at the code with tool from dev on chrome for the Send button
If only show.
< a href = "javascript:apex.submit ('SUBMIT'); "class ="uButton"id ="B67074418713946955629"role ="button"> < span > Submit </span > < /a >
So how do I know what return? Thx for all the help
Hi Kazuneric,
kazuneric wrote:
I intend to pass the parameter in the URL for a user to click through
You will find the following useful threads:
Call a rendering of APEX (EPG) form of procedure within the error
403 Forbidden error URL the PL/SQL procedure call
I hope this helps!
Kind regards
Kiran
-
How to call the pl/sql function in application of the ADF
Hi Experts,
I need to call the pl/sql function in application of ADF, I have logic written in my AM
Method:
public String reportStoredProcedure (locationID customerID, number,
String tailNum) {}
CallableStatement st = null;
String v_sanctioned = null;
If (locationID! = null & & customerID! = null & & tailNum! = null) {}
System.out.println (locationID + "" + customerID + "" + tailNum);
Tail string = "TAIL";
String result = "N";
try {}
String stmt =
"start XXWFS_SANCTIONS_PKG. CHECK_SANCTION(:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11); end; « ;
St = getDBTransaction () .createCallableStatement (stmt, 0);
st.setNull (1, Types.VARCHAR);
st.setNull (2, Types.NUMERIC);
st.setObject (3, customerID);
st.setNull (4, Types.NUMERIC);
st.setNull (5, Types.NUMERIC);
st.setObject (6, locationID);
st.setNull (7, Types.NUMERIC);
st.setNull (8, Types.NUMERIC);
st.setObject (9, tail);
st.setObject (10, tailNum);
st.setObject (11, result);
St.Execute ();
System.out.println ("v_sanctioned in AM:" + v_sanctioned);
} catch (Exception e) {}
e.printStackTrace ();
return "N";
} {Finally
If (st! = null)
try {}
St.Close ();
} catch (Exception e1) {}
E1. PrintStackTrace();
return "N";
}
}
} else {}
System.out.println ("v_sanctioned is null");
v_sanctioned = "N";
}
Return v_sanctioned;
}
Error:
java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in the call to 'CHECK_SANCTION '.
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:191)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:950)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1224)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3386)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3487)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:3858)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:99)
at model.view.CardAMImpl.reportStoredProcedure(CardAMImpl.java:182)
at com.emboss.bean.ReadyToPrint.invokeVSanctioned(ReadyToPrint.java:485)
at com.emboss.bean.ReadyToPrint.PrintingCards(ReadyToPrint.java:434)
at com.emboss.bean.ReadyToPrint.printCards(ReadyToPrint.java:204)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1259)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:97)
to oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$ 1.run(ContextSwitchingComponent.java:90)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:91)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:420)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:420)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:94)
at java.security.AccessController.doPrivileged (Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.doIt (WebAppServletContext.java:3684)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Can someone help me how to call...Call it in function, not as a procedure you do
try { String stmt = "begin :1 := XXWFS_SANCTIONS_PKG.CHECK_SANCTION(:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12); end;"; st = getDBTransaction().createCallableStatement(stmt, 0); st.registerOutParameter(1, Types.VARCHAR); st.setNull(2, Types.VARCHAR); st.setNull(3, Types.NUMERIC); st.setObject(4, customerID); st.setNull(5, Types.NUMERIC); st.setNull(6, Types.NUMERIC); st.setObject(7, locationID); st.setNull(8, Types.NUMERIC); st.setNull(9, Types.NUMERIC); st.setObject(10, tail); st.setObject(11, tailNum); st.setObject(12, result); st.execute();
= st.getString(1); -
I have a pl/sql procedure that may attend the 2-20 mins depanding on the data.
How to call this the BPEL?
Prasanna-One way to do this would be:
1. define a DBMS_SCHEDULER job for your pl/sql procedure.
2. use BPEL to submit the work.
3. query the table on user_scheduler_jobs or any other table that you can use to find out when the work.Another way would be to use (if you also have ODI):
1 use ODI to call the plsql in a package
2 expose the workflow as a Web Service for BPEL
3 package ODI BPEL recall once the work is completed and a correlation between the response to the request.Thank you
Neil. -
How to write a pl/sql procedure that checks the remote db?
Hi all
I have one criticism PROD remote database I want to check every 10 minutes for its connectivity. If the connection fails then an email and a text Message is sent to me.
My question is what is the best way to check if the remote database is running?
Can I use sqlplus system/manager@PROD? But sometimes this has taken so long and suspended. I want the best response time?
How can I write a pl/sql procedure control connection? What do something like the ff:
I created a table for my tnsname.ora entries.
Something like that?cursor is c1 select dbname from tnsnames_tbl; begin connect system/[email protected]; print c1.dbname || 'DB Connection OK'; exception when others; print c1.dbname || 'DB Connection Not OK'; end; end;
Thank you
KinzNot really feasible at the level of PL/SQL.
The reason is that the greatest strength of TCP's robustness. TCP will try as hard as possible to succeed, before failing. It was designed to still work on the severely damaged or broken communication as a result of nuclear infrastructure. A TCP connection can take up to 15 minutes, maybe even more, before failing. It can be as slow as a turtle-, but he's wearing a hardshell. (unlike the UDP, which is the opposite)
So if you want to test the TCP connectivity, you must design your own custom code to implement your assumptions about the latency of packets, earthquakes and drops and so on.
Otherwise, you will need to use a standard TCP socket, set a time limit, try to login - and hope for the best.
This approach, I have demonstrated in {message identifier: = 10111306}.
If the TCP test works, it means that the listener is in place. Does not mean that the database itself is in place. Which means then using a database link to be tested. And this in turn can hang due to problems with archive record being stuck, not enough idle servers shared, etc..
-
Call the PL/SQL procedure with different parameters?
I use PL/SQL for web development. I have a page of PL/SQL which collects information and returns the user off site with one return url (another PL/SQL procedure).
I have the return procedure with every documented return variable (default null) in order to always take the return. However, there are (reported... cannot reproduce because of the nature of the business) cases where a 404 error is returned because of the incompatibility of parameter.
Is it possible to proceed regardless of the parameters? Someone at - it suggestions?
Thank you!user2960509 wrote:
My problem is that they sometimes send back of settings that do not match what I expect.
Use the interface "+ flexible +" mod_plsql - see the Oracle® HTTP Server mod_plsql user's Guide for the documented details.
The signature of the procedure parameter is as follows (it is called by mod_plsql using tables of name value pairs):
create or replace procedure Scott.MyWebProc( name_array owa.vc_arr, value_array owa.vc_arr) is ...
In your code, you just browse the berries to get the name values passed query string. You can even filled an associative array in your code (a table indexed by string and no number, where the index string represents the name of param)-this approach can make it pretty easy for the code make reference to a parameter, with little effort on your part to provide an interface to query by name for code to get the value of a parameter name.
To enable the flexible (aka parameter 2) call interface, precede the call to web with an exclamation character. For example
http://my-webserbver.my-domain.com/pls/dad/!scott.mywebproc?name-1=val-1&name-2=val-2..,name-n=val=n
-
How to call a PL/SQL for a hyperlink column report procedure
Hallo!
Normally, a value of column in a report, a link takes you to a page in your application or to another URL.
And you can send the value of this cell to the calling page.
I want that oracle runs a procedure with the values as in parameters, if I click on this hyperlink.
Should I call a dummy page and define this procedure in the header of this page, or leave it otherwise?
Can give you an example to my?
Thank you very much!
GerhardIt is a case of use of an application process.
-
How to call parameters for a procedure of a table?
Hello world
I use the oracle 11.1.0.6 version.
I have a procedure that must call 6 parameters in a table. Could I know how to perform the procedure parameters in a table?
Now, I'm running a .sql file.
SELECT TO_CHAR(SYSDATE,'DD/MM/YY hh24:mi:ss') FROM DUAL;
EXEC call_all (201208, 'DBC', 2, 'Choice', 201223, 201236);
Thanks in advanceHow do you get the values of the parameters to pass to the CALL_ALL procedure?
If you want to get all the parameters to pass to CALL_ALL, to be taken from the table, you will need to do so in an anonymous PL/SQL block/function/stored procedure as below:
declare v_bmonth param.bmonth%type; . . . v_tweek_2 param.tweek_2%type; begin select bmonth, ssc, label, tweek_1, tweek_2 into v_bmonth, ..., v_tweek_2 ---> ... corresponds to Individual Parameter variable from param p where p.some_column = some_value ---> This condition should be able to fetch only One row from table, else it will throw error. call_all(v_bmonth, ... v_tweek_2); end; ------Alternative------------------- declare v_param param%rowtype; begin select * into v_param from param p where p.some_column = some_value ---> This condition should be able to fetch only One row from table, else it will throw error. call_all(v_param.bmonth, ... v_param.v_tweek_2); ---> ... corresponds to v_param."Column_Name" for corresponding column names. end;
Just read that you want to run the procedure for all values:
begin for cur in (select * from param) loop call_all(cur.bmonth, ... cur.v_tweek_2); end loop; end;
I want to do it in a simpler way:
create or replace function f_execute_call_all ( b_bmonth in number, b_banner_name in varchar2, b_ssc in number, b_label in varchar2, b_tweek_1 in number, b_tweek_2 in number ) return number is begin call_all(bmonth,banner_name,ssc,label,tweek_1,tweek_2); return 1; exception when others then -- Log Exception Message raise; end; calling Code: select f_execute_call_all(bmonth,banner_name,ssc,label,tweek_1,tweek_2) from param;
-
Call Package PL/SQL procedure via a url (prior R12 through "Enabled/pl/sql")
All the
Prior R12:
This could be achievied through registration of your 'Package.Procedure' in the ' allowed Web PL/SQL "-screen." " Then the Package.Procedure could be called as: http://find-151.cmcdev.be:8004/pls/find/XXIE_INTERFACE.SHOWINTERFACELOG?p_itemkey=INFILE-454613-3074 & p_interfdef = EDG...
In R12:
I am looking for a way to do it, but after registering the PL/SQL in the table of this way of working always returns: "Page not found".
Someone has additional information on this subject on how to proceed in R12, that I can't find any documentation, examples for this?
Concerning
Laura OlivierMOD_PLSQL is no longer available in R12. PL see ML Doc 726711.1 (Mod_plsql and Oracle E-Business Suite Release 12)
HTH
Srini -
How to use the pl/sql procedure
Hi all,
How to use pl/sql packages and especially in what situations we are pl/sql, which is the cause of the procedure. Please explain with precision using small example.
Thanks and greetings
RAM
I could tell this at a very high level.
PL/SQL's procedural extension to SQL. SQL (structured query language) has no procedural capacity. They are executed as a stand-alone statement. When you want to generate a process flow with several SQL statement that you need to have a procedural language that could accommodate your SQL. PL/SQL is something similar to Java and Dot Net in this aspect. Said that PL/SQL is Oracle DB. This has some advantages. The most important thing is that when you have your SQL in PL/SQL oracle maintains its reliance on the object. Any database oracle related so you want to build, then you can consider to PL/SQL as the best way to use process flows.
PL/SQL provides various methods such as the PROCEDURE, FUNCTION and the PACKAGE. The only thing that race stands is in its ability to modularize your code. So, using the package you can create process workflows that is modular and easy to understand.
-
How to call the pl/sql function of the ofa
Dear friends,
I am trying to call a function of OPS page .but iam getting error as
java.sql.SQLException: ORA-01861: literal does not match the format string
ORA-06512: at line 1
It is my function, callable statement
FUNCTION CAR_LOAN_VALIDATION (P_PERSON_ID IN NUMBER
P_DEDUCTION_START_DATE AS
P_DEDUCTION_END_DATE AS
P_LOAN_VALUE NUMBER
)
RETURN VARCHAR2
IS
l_message VARCHAR2 (100);
l_contract_type VARCHAR2 (50);
l_loan_eligible_date DATE;
l_grade VARCHAR2 (15);
l_old_loan_end_date DATE;
l_max_loan_end_date DATE;
l_remaining_amount NUMBER;
l_eligible_amt NUMBER;
BEGIN
BEGIN
SELECT - papf.person_id,.
(SELECT the sense
OF hr_lookups
WHERE lookup_type = 'ADTC_CONTRACT_TYPE. '
AND lookup_code = attribut3) contract_type;
ADD_MONTHS (papf.original_date_of_hire, 11) loan_eligible_date,.
DECODE (paaf.ass_attribute2,
'President', '' President. ''
SUBSTR (ass_attribute2, INSTR (ass_attribute2, '.', 1, 1) + 1,)
3)
) grade.
(SELECT nvl (MAX (deduction_end_date), null)
OF xxadtc_car_loan_request
WHERE person_id = p_person_id) old_loan_end_date;
TO_DATE (ADD_MONTHS (p_deduction_start_date, 47)) max_loan_end_date
-to_date (ADD_MONTHS (sysdate, 47)) max_loan_end_date
IN l_contract_type
l_loan_eligible_date
l_grade
l_old_loan_end_date
l_max_loan_end_date
OF per_all_people_f women's wear, per_all_assignments_f ADP
WHERE SYSDATE BETWEEN papf.effective_start_date AND papf.effective_end_date
AND papf.business_group_id = 81
AND papf.person_id = paaf.person_id
AND SYSDATE BETWEEN paaf.effective_start_date AND paaf.effective_end_date
AND papf.person_id = P_PERSON_ID;
EXCEPTION
WHILE others THEN
DBMS_OUTPUT. Put_line ('error');
END;
-to obtain the amount of the previous car loan-
BEGIN
SELECT to_number (prrv.result_value)
IN l_remaining_amount
OF per_all_people_f women's wear.
per_all_assignments_f ADP,
pay_assignment_actions CIP,
pay_run_results prr,
prrv pay_run_result_values,
petf pay_element_types_f,
pay_input_values_f pivf,
pay_element_classifications pec,
pay_payroll_actions App,
TPP per_time_periods
WHERE SYSDATE BETWEEN papf.effective_start_date AND papf.effective_end_date
AND papf.person_id = paaf.person_id
AND papf.business_group_id = 81
AND SYSDATE BETWEEN paaf.effective_start_date AND paaf.effective_end_date
AND paaf.assignment_id = pac.assignment_id
AND pac.assignment_action_id = prr.assignment_action_id
AND prr.run_result_id = prrv.run_result_id
AND prr.element_type_id = petf.element_type_id
AND SYSDATE BETWEEN petf.effective_start_date AND petf.effective_end_date
AND prrv.input_value_id = pivf.input_value_id
AND SYSDATE BETWEEN pivf.effective_start_date AND pivf.effective_end_date
AND pivf.NAME = 'balance '.
AND petf.classification_id = pec.classification_id
AND pac.payroll_action_id = ppa.payroll_action_id
AND ppa.time_period_id = ptp.time_period_id
AND TO_CHAR (ptp.pay_advice_date, 'Mon-YYYY') =
To_char (SYSDATE, "Mon-YYYY")
AND petf.element_name = "Fashions ready Ahlami"
- and employee_number = '10185'
AND papf.person_id = p_person_id;
EXCEPTION
WHEN no_data_found THEN
-DBMS_OUTPUT. Put_line (' ERROR: no data!');
l_remaining_amount: = 0;
WHILE others THEN
DBMS_OUTPUT. Put_line ('error');
END;
Select GET_CAR_LOAN_ELIGI_AMT (P_PERSON_ID)
in l_eligible_amt
Double;
IF L_contract_type NOT IN ("Permanent") THEN
l_message: = 'contract Type is invalid. "
END IF;
IF l_loan_eligible_date < SYSDATE THEN
l_message: = 'Date to join is less then a year. "
END IF;
IF l_grade IN ('US', '00', 'AUS', ') THEN
"l_message: = ' your are not eligible Grade."
END IF;
IF l_old_loan_end_date < SYSDATE THEN
l_message: = 'previous loan period is not completed. "
END IF;
IF l_max_loan_end_date > P_DEDUCTION_END_DATE THEN
l_message: = 'Maxinum number of monthly payment for 48 months;
END IF;
IF l_remaining_amount > 0 THEN
l_message: = "amount of the previous car loan is waiting until";
END IF;
IF l_eligible_amt < p_loan_value THEN
l_message: = 'Please check eligible amount ";
END IF;
RETURN nvl(l_message,'S');
EXCEPTION
WHEN NO_DATA_FOUND
THEN
RETURN "error";
END CAR_LOAN_VALIDATION;
END XX_CAR_LOAN_REQUEST_PKG;
CODE THAT CAN BE CALLED BY CODE - CO STATEMENT
{if (PageContext.GetParameter ("Submit")! = null)}
OAViewObject vo2 = (OAViewObject) am.findViewObject ("XxadtcCarLoanRequestEOVO1");
{if(VO1!=null)}
VO1. GetCurrentRow () .setAttribute ("LoanStatus", "pending approval");
int xxpersonId = pageContext.getEmployeeId ();
String xxDeductionStartDate = vo2.getCurrentRow ().getAttribute("DeductionStartDate").toString ();//pageContext.getParameter("DeductionStartDate").toString();
SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyy/mm/dd");
ConvertedDate1 date = dateFormat1.parse ("xxDeductionStartDate");
String xxDeductionEndDate = vo2.getCurrentRow ().getAttribute("DeductionEndDate").toString ();//pageContext.getParameter("DeductionEndDate").toString();
SimpleDateFormat dateFormat2 = new SimpleDateFormat("yyyy/mm/dd");
ConvertedDate2 date = dateFormat2.parse ("xxDeductionEndDate");
String xxLoanValue = vo2.getCurrentRow ().getAttribute("LoanValue").toString ();//pageContext.getParameter("LoanValue").toString();
int iLoanValue = Integer.parseInt (xxLoanValue);
System.out.println ("loop submit input");
System.out.println ("xxpersonId id is:" + xxpersonId);
System.out.println ("xxDeductionStartDate id is:" + xxDeductionStartDate);
System.out.println ("xxDeductionEndDate id is:" + xxDeductionEndDate);
System.out.println ("xxLoanValue id is:" + xxLoanValue);
TXN OADBTransaction = am.getOADBTransaction ();
String sql = "START: 1: = XXADTC_CAR_LOAN_REQUEST_PKG." CAR_LOAN_VALIDATION(:2,:3,:4,:5); END; « ;
CallableStatement cs = txn.createCallableStatement(sql,1);
String outputval = null; / / int outputval = 0;
try {}
System.out.println ("entry into loop try funtion callable validation");
cs.setInt(2,xxpersonId);
System.out.println ("cs setInt (2, xxpersonId);") is executed");
cs.setString(3,xxDeductionStartDate);
System.out.println ("cs.setString (3, xxDeductionStartDate is executed);'");
cs.setString(4,xxDeductionEndDate);
System.out.println ("cs.setString (4, xxDeductionEndDate is executed);'");
cs.setDate(3,xxDeductionStartDate);
cs.setDate(4,xxDeductionEndDate);
cs.setInt(5,iLoanValue);
cs.registerOutParameter(1,Types.VARCHAR); / / cs.registerOutParameter(1,Types.NUMERIC);
DSI Execute();
outputval = cs.getString (1); / / txn.commit ();
System.out.println (outputval);
TXN.Commit ();
If (outputval. Equals ("S"))
{
am.invokeMethod ("apply");
}
on the other
{
throw new OAException ("is:" + outputval, OAException.INFORMATION name of the Organization);
}
TXN.Commit ();
}
{} catch (Exception sqle)
try {}
DSI Close();
}
catch (System.Exception e)
{
throw OAException.wrapperException (e);
}
throw OAException.wrapperException (sqle);
}
}
Please help where is the error.
Help, please
Let me know for any clarification.
Thank you
Aravinda.
Ford Hi,
See below the code.
In the controller
java.sql.Date DeductionSDate; declare the variable
In LICS
String xxDeductionStartDate = vo2.getCurrentRow () .getAttribute ("DeductionStartDate");
TXN OADBTransaction = am.getOADBTransaction ();
if(xxDeductionStartDate!=null)
{
java.sql.Date startDate = txn.getOANLSServices () .stringToDate (xxDeductionStartDate);
DeductionSDate = startDate;
}
Assign to this cs.setDate(3,DeductionSDate);
Thank you
Dilip
-
How to call a pl/sql UNIX program
Hello
Can someone tell me please for example to call a script shell unix from a PL/SQL program.
dbms_scheduler is an option.
-
How to call a pl/sql function ofa
Hello
When I train call Comptrollership, the error as "bind variable does not exist. Function has 2 input parameters, and it returns a Boolean value. How to solve this error? Can someone help me please... I'm new to OFA.
TXN OADBTransaction = am.getOADBTransaction ();
CallableStatement cs = CreateCallableStatement ("Begin: 1: = resp_license_func (?)") End; ", 2) ;
String outputval = null;
try {}
cs.setString(1,appl_name);
cs.setString(2,user_name);
cs.registerOutParameter(1,Types.VARCHAR);
CS. Execute();
outputval = cs.getString (1);
TXN.Commit ();
}
catch (Exception e) {}
throw new OAException (e.getMessage ());
}
Thank you
NGOHello
You need to change the lines below:
String outputval = null; for int outputval = 0;
cs.registerOutParameter(1,Types.VARCHAR); to cs.registerOutParameter(1,Types.NUMERIC);
outputval = cs.getString (1); to outputval = cs.getInt (1);
Kind regards.
Maybe you are looking for
-
How can I increase the passwords of Safari beyond just a PIN
While I was playing under settings on my iPad today, I noticed a "password" for Safari. After asking me for the 4 PIN digit I use to secure my iPAD, it took me to a list of every password for every site. While I'm sure that this is normal, many of th
-
Satellite P10 554: I want to replace my carpet ODD-Drive * a UJ-811
Hello everyone, I want to replace my carpet ODD-Drive * a UJ-811. My question: is this master drive or balm or cabelselect und is compatible with the Slim NEC AD - 7540A?Thanks for the reply
-
What to do to keep a Boolean pulse?
I want to generate a Boolean pulse and then hold this value until a new impetus, as a CRS to electronics. I am a very beginner labview user, so I ask you guys to be as clear as possible. If you could send me a VI he would be great. Thanks to you all!
-
LaserJet 400 M451dn: laserjet 400
I have a printer LaserJet 400 M451dn . There was a severe storm, but the printer is on a surge protector APC, including a printer HP LaserJet P1501n and other devices. All other devices operate normally. The LaserJet 400 M451dn printer when turned on
-
blackBerry Smartphones Logman upgrade of OS 4.5
I have been hidden for a while. Got a great help here already and now thinking about upgrading to OS4.5 on my TMo 8320. I've read all threads regarding the upgrade and sure I can do it without problem. However, my 8320 works great right now, so what