The call PLSQL stored procedure from the HTML form Submit button
HelloI'm having a little difficulty with the appellant a stored procedure using a html form button. Here is the code I have right now...
HTP.PRINT('<form action=ZWGKERCF.P_confdelete>');
HTP.PRINT('<input type=''submit'' value='' Yes '' onClick=''document.getElementById("mypopup").style.display="none"''>');
HTP.PRINT('</form></div>');
Here's the question - I need to find a way to pass variables to this stored procedure, so he knows what data to operate on. This stored procedure removes the data in a specific database record and I have to pass three variables to this procedure to run.Allows to call class_number, term, conf will impact these three variables and the data will be deleted and the person will see a confirmation screen once the deletion request completed.
So ideally I would want: ZWGKERCF. P_confdelete (class_number, term, conf), then the stored procedure would deal with the rest!
Seems simple enough, but I don't know how to make this happen... My thoughts were:
Transmit data to this (the three areas that I need) html form in hidden variables. Then somehow pass them using the POST method to the procedure and read using GET?
Can someone clarify what the best way to do it? I feel that its little something miss me you - but I would really like an idea expertise :-)
Thank you very much in advance!
-Jeff
>
...
I would like to assign a variable, the duration, the conf crn all variables in this procedure and then act on them accordingly.
But you already have it in a variable. If you want you can assign the value again to another variable.
example of
PROCEDURE P_confdelete(CRN NUMBER,TERM NUMBER, CONF VARCHAR2)
IS
v_crn number(38);
v_term number(38);
v_conf varchar2(1000);
BEGIN
HTP.PRINT('test1 '||crn||'/'||term||'/'||conf);
v_crn := crn;
v_term := term;
v_conf := conf;
HTP.PRINT('test2 '||v_crn||'/'||v_term||'/'||v_conf);
END P_confdelete;
Tags: Database
Similar Questions
-
Internal error: catalog view incompatible when calling a stored procedure
Hello
I use JDeveloper 11.1.1.4
When you call a stored procedure from AppModuleImpl, I get this error internal error: inconsistent display catalog
I'll call the stored procedure of this way
String lErrCode;
String lErrMsg;
Result of an integer;
ARRAY inputArray = null;
Table STRUCT that can be passed to a PLSQL PROCEDURE
inputArray =
JdbcSqlMapper.preparePlSqlArrayUsingVOAttrbs (conn, recordType,
view, rm);
OracleCallableStatement st =
(OracleCallableStatement) conn.prepareCall ("{?}") = call ("+
procedureName +.
"(?,?,?))}");
st.registerOutParameter (1, Types.INTEGER);
st.setObject (2, inputArray, OracleTypes.ARRAY);
st.registerOutParameter (2, OracleTypes.ARRAY,
recordType.getTableType ());
st.registerOutParameter (3, Types.VARCHAR);
st.registerOutParameter (4, Types.VARCHAR);
St.Execute ();
I checked the subsidies for this package to all users. All users with grants to this package.
I don't know where I start to debug this issue.
Kindly help.
Thank you and best regards,
John.
Have yo uchecked the right of the types of data used (at least the TABLE) to the user (referred to Pokusak blog: JPublisher - incompatible catalog display)?
Timo
-
Hi Experts,
JDeveloper 12.1.3.0.0
I have a VO based on entity object. With a column of the VO is transient attribute (I created).
I need to call a stored procedure for each row in the transitional attribute and display the data in the form of af: table. As well as other attributes.
So can anyone suggest how can I achieve this?
Thank you
AR
I think that you need a stored function (which returns the value) in this case, is not?
Take a look at:
https://docs.Oracle.com/CD/B31017_01/Web.1013/b25947/bcadvgen005.htm
and search for:
Invoking stored function with only Arguments in
call your function in the Get attribute and return value accessor...
-
A wrong number or types of arguments in the call to stored procedure
Hi all...
I'm missing something simple here, but I don't see what it is.
I have looked around and cannot know what the problem is.
Calling a stored procedure in Oracle 11g of Java 6.
Here is my code:
Here are my stored procedure:CallableStatement proc = null; proc = conn.prepareCall("{ call storedProc(?, ?, ?, ?, ?) }"); proc.setString("p_header", "8YR6TG"); proc.setString("p_optype", "A"); proc.registerOutParameter("p_headerCursor", OracleTypes.CURSOR); proc.registerOutParameter("p_detailCursor", OracleTypes.CURSOR); proc.registerOutParameter("p_status", OracleTypes.VARCHAR); proc.execute();
Here's the exception I get:PROCEDURE storedProc ( p_header IN VARCHAR2, p_optype IN VARCHAR2, p_headerCursor OUT R_CURSOR, p_detailCursor OUT R_CURSOR, p_status OUT VARCHAR)
Can you see what I'm doing wrong here?java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'storedProc' ORA-06550: line 1, column 7: PL/SQL: Statement ignored at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:626) at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:181) at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:870) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1081) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2905) at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:2996) at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4120)
Thanks in advance for your comments!
Published by: Brady on February 16, 2012 13:02try to use digital indexes instead of parameter names.
-
call a packed stored procedure from within another stored procedure
I have a stored procedure (STROKEQC) on a scheme that is not in a package. I want to be able to call a procedure stored that IS inside a package on the same scheme of STROKEQC. When I try the syntax below, I get an error "no function with name 'PARTICIPANTSPECIFICEDITS' exists in this area." That the procedure exists.
Is not the way to do inside a stored procedure?/*Generate admin field data*/ execute immediate QCPROCEDURES.PARTICIPANTSPECIFICEDITS('ALL'); execute immediate QCPROCEDURES.GENERATE_SURGYEAR_ERRFLAG;
Thank you!
EvaHi, Eva,.
You need not EXECUTE IMMEDIATE to call a stored procedure (including a procedure in a package) on the other. Just use the name and the arguments (if any):
QCPROCEDURES.PARTICIPANTSPECIFICEDITS('ALL'); QCPROCEDURES.GENERATE_SURGYEAR_ERRFLAG;
I guess qcprocedures is the package name, and participantspecificedits and generate_surgyear_errflag are procedures in this package.
In case you're wondering, the error was probably because you do not have a variable called participantspecificedits. If you had a dynamic code in a string called variable x, then "EXECUTE IMMEDIATE x"; would be the way to run it.
-
Is there a way to call a MSSQL stored procedure from Flex/ActionScript...
Is there a way to call a MSSQL stored procedure from Flex/ActionScript without using ColdFusion or another middleware? I usually use CF, but I need to call my AS code inside MS.
Thank you!
Lee
No, because you cannot expose your database server to external users. but you can call a remote method that can run your database procedures
-
How can I call two functions in the HTML Form element attributes
Hello
I want the same value in the text field two, when I select the value to select the list then the value with a number increment should be two text field.
I use both java script
< script >
function sumItems() {}
function getVal (item) {}
If ($x (point) .value! = "")
Return parseFloat ($x (item) .value);
on the other
return 0;
}
$x('P19_LAST_END_YR').value = getVal ('P19_LAST_STR_YR') + 1;
}
< /script >
< script >
function per1Items() {}
function getVal (item) {}
If ($x (point) .value! = "")
Return parseFloat ($x (item) .value);
on the other
return 0;
}
$x('P19_LAST_END_YR').value = getVal ('P19_START_YEAR') + 1;
}
< /script >
now how can I call function onchange two attributes of the element in the HTML form for the discount:
' onChange = "javascript:sumItems()" onChange ="javascript:per1Items().Hello
Try
onchange="sumItems();per1Items();"
BR, Jari
-
[BC] Call a stored procedure taking parameters of table
Hello!
I currently have a request of the OIC that makes thousands of calls per second stored procedure. The stored procedure runs a business logic that I want my client application to stay informed. I want to reduce the cat of the database and instead to call the stored procedure from thousands of times per second, call the procedure (for example) once per second, but with values of one mile.
I used OCIBindArrayOfStruct successfully to perform inserts bulk, where my OCI application executes a () INSERT INTO using the function "iters" and it might be possible to do something similar with the stored procedure, but I want to do something slightly different, because the procedure stored something like this:
* If a specific condition is set, call a secondary stored procedure
* If another special condition is set, insert a row into a table of some
I so wanted to do was to pass a table (or a series of tables) in the stored procedure, then the stored procedure to use optimal methods that are available, such as FORALL, to perform each of the tasks, the more effectively.
So I thought to create a type, such as a TABLE OF VARCHAR2, or a VARRAY and possessing of the parameters for the stored procedure based on this type, something like:
create or replace TYPE 'NTT_VARCHAR2' AS TABLE OF VARCHAR2 (32700);
create or replace FUNCTION bulk_process_values)
p_error_message OUT NOCOPY VARCHAR2,
p_module_context_name OUT NOCOPY VARCHAR2,
p_sql_error OUT NOCOPY VARCHAR2,
p_count in NUMBERS
p_non_array_var_1 IN VARCHAR2,
p_non_array_var_2 IN VARCHAR2,
p_array_var_1 IN NTT_VARCHAR2,
p_array_var_2 IN NTT_VARCHAR2,
p_array_var_3 IN NTT_VARCHAR2
< etc. for all the variables in table >)
RETURN NUMBER
.. .but I am struggling to find an example of how call the procedure "bulk_process_values" stored, and even if I use a TABLE OF VARCHAR2 or a VARRAY as a parameter type.
I searched the Internet and found this: binding table of the structs (OCIBindArrayOfStruct) sample code
- and- but they take different approaches and a bit confused (the second example spoke of OTT).
I think that the first approach is more likely to be the solution I need - but I can't help thinking - it is a bunch of stuff to move if it does not end up significantly improve performance!
My questions are:
* Moves to a call-SP-thousands-of-times-per-second to call-SP-fewer-times-but-with-array-parameters sensitive?
* Should the table or VARRAY, TABLE OF VARCHAR2 parameters or something else?
* Should I use for my case OTT?
Samples I found are both very old - and the second example indicators that the optimal approach evolves with the OCI versions - I'm on 11.2, what is the optimal approach these days?
* < added later > why is there no official useful example?
Thank you very much
Much appreciated. has actually worked, with VARRAY, with a proof of concept. Now I just need to shake a little and then get my PL/SQL for optimal PC experts. I think I was really discouraged by the lack of official documents, with the Community (Paradise) is the only way to get real results.
Thank you JJ.
I intend me to use the binding enforcement of the table and the table and avoid N back and forth, but I do not then get the opportunity to do something clever in the PL/SQL.
In the PL/SQL, there is no logic occurring - I don't call the same SP tons of times, but then I want to be able to use PL/SQL optimizations such as FORALL, BULK COLLECT, reduce the number of validations and others. There is a commit after each SP run, because otherwise the nature of demand means that the application hangs occur; However, there is a way (I think) be smart on the part that is likely to deadlock (making a shape on the Bay First, then applying the updates in the order sorted and then failed to get a blocking theoretically), and then FORALL insert for the second part of the stored procedure.
I guess I may apply the single return, passing a table (to a commit in the SP)-which will reduce back and forth, so gain in performance, but it will not reduce the number of validations that I do - and Oracle said that commits too frequent is not good for performance. I already have code in my framework that does - by making a simple INSERT INTO.
Good to hear that OTT is not explicitly required - and VARRAY resembles the approach to try first.
-
Simple question-how to call a stored procedure or function of apex?
Simple question-how to call a stored procedure or function of apex?
Thanks advance.
DougHi Doug,.
You can call a procedure or function of apex. It depends on what you want to do with the function or procedure. If you want to retrieve table data in a specific area, you can try something like this-The following statement creates the function get_bal on the oe.orders of sample table (PL/SQL is in italics):
CREATE FUNCTION get_bal (acc_no in NUMBER)
RETURN NUMBER
IS acc_bal NUMBER (11.2);
BEGIN
SELECT order_total
IN acc_bal
Orders
WHERE customer_id = acc_no;
Return (acc_bal);
END;
/The function created in the previous example can be used in a SQL statement. For example:
SELECT get_bal (165) FROM DUAL;
GET_BAL (165)
------------
2519hope this will help,
Kind regards
Pascal M
http://Tajuddin.whitepagesbd.com -
How to call a stored procedure in ADF
How to call a stored procedure in the ADF (Jdev 11.1.1.6)?
Code sample stored procedure:
CREATE or REPLACE PROCEDURE SP_HELLOWORLD
(
NAME IN VARCHAR2
OUT VARCHAR2 DESIRES
) AS
BEGIN
WISHES: = 'Hello'. name | ', Welcome to MS.';
END SP_HELLOWORLD;
Your Code of ADF is:
try {}
System.out.println ("* beginning of the code *");
String sql = "start SP_HELLOWORLD(:NAME,:WISHES); end; ";
CallableStatement st = getDBTransaction () .createCallableStatement (sql, getDBTransaction(). DEFAULT VALUE);
st.setObject ("NAME", "ABC"); Replace with required param
st.registerOutParameter ("WISHES", Types.VARCHAR); import java.sql.Types;
St.Execute ();
System.out.println ("the output of the function DB is:" + st.getObject ("WISHES"));
System.out.println ("* end of code *");
} catch (Exception e) {e.printStackTrace () ;}
-
Problem call Oracle10g stored procedure (bug?)
Hello everyone, I'm trying to call a stored procedure Oracle on Oracle 10 g XE of Java.
I can successfully run the query to Java, so I can't tell what driver, connection,... are very good.
I have the following error when I try to call a stored procedure or a function.
I think it's a bug OraClient10.Dll file, so, in general, a bug that depends on my code. So I install the latest version of the JDK/JRE, and I download new folder OraClient10.Dll but the result was the same.
Please help me!
Thank you
Manti
#
# A fatal error has been detected by Java runtime environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc = 0x61d37460, pid = 3872, tid = 1224
#
# Version JRE: 6.0_16 - b01
# Java VM: Java hotspot Client VM (14: 2 - b01 mixed mode windows - x 86)
# Problematic frame:
# C [OraClient10.Dll + 0 x 117460]
#
# A file error with more information report is saved as:
[...]
#
# If you want to submit a bug report, please visit:
[...]
# The accident happened outside the Virtual Machine Java to native code.
# See problematic frame for where report them the bug.
#Why not just connect via thin mode of the driver, not the mode of the OIC?
You will get all the features and no risk of native code bug. -
How to call a stored procedure stored procedure
Hello Experts,
I need help, even if stored procedures. I tried to know without a bit of luck. Is it possible to call the stored procedure to another stored procedure? The problem is my boss want me to work on a stored procedure, but I do not have the appropriate privileges. He won't give me permissions either. He suggested that to a stored procedure and call this stored procedure after creating a new procedure. Is this possible? If Yes, how can I do it?
I thank in advanceascheffer wrote:
Without the "privileges", whatever it is, your features in other nesting procedures won't help.Anton
Unless...
It goes to an anonymous PL/SQL block to allow him to test its procedures. ;)
SQL> ed Wrote file afiedt.buf 1 declare 2 procedure test_proc(p_var IN VARCHAR2) is 3 begin 4 dbms_output.put_line(p_var); 5 end; 6 begin 7 test_proc('This is a test proc'); 8* end; SQL> / This is a test proc PL/SQL procedure successfully completed. SQL>
-
Cannot call all stored procedures
Hello
I tried to call a stored procedure to coldfusion, but EACH time, there has been an error:
"The system has attempted to use a value that is undefined, which usually indicates an error programming, either in your code or system code.
NULL pointers are another name for undefined values.
Here is my code for the stored procedure:
It was really because of this driver.
Thanks a lot guys.
-
several events in the attributes of the Html form element?
How can we put more than one event in the Form Html element attributes?
For example, I have:
onChange = "zeroTenScaleCheck (this); »
and
onClick = "checkScroll (this); »
I want both of you to be active on the same element. It is possible and if so, how?
Another related question is, is it possible to have two handlers listening on the same
event?
Thank you!Hello
Place the HTML Form attributes of the element element
onchange="zeroTenScaleCheck(this);" onclick="checkScroll(this);"
Call two javascripts for example the onchange event, place to the Form HTML element attributes
onchange="zeroTenScaleCheck(this);checkScroll(this);"
Kind regards
Jari -
The HTML Form element attributes: Onchange
Hello
I get an error when I have two "Onchange =" for an Items element. Its shape and I want to be able to click the Previous and Next button to scroll through the records, but one already has an Onchange when the other Onchange is added I get an error:
The form Creation Wizard of paging uses
the JavaScript onChange event to alert users
When they are about to leave a page without
save their changes. Remove the onChange
event from any article with a database source
Column, restart the wizard.
Is it possible to have two Onchange =... to an article 'Attributes of the HTML Form element'?You are welcome!
Concerning
Andy
Maybe you are looking for
-
Is it possible to merge duplicate in the same address book addresses?
Instead of the address several books have combined all in one by drag-and - drop into the main address book. Is there a method to merge duplicate addresses such that no data is lost? Whether an entry had different data to duplicate another they can b
-
Qosmio X 500 - 11 d: Fingerprint reader question and webcam problem
Hello I am the owner of a portable X 500 - 11 d of Qosmio computer and I ran into a few problems these last time: 1. After installing windows 7, the fingerprint reader has worked flawlessly for about a month, but now the login screen of windows 7 not
-
Windows XP does not, no other Options!
Hi, I have Windows XP SP2. A few days ago, I uninstalled Windows 7 Transformation Pack, something I installed myself into the file system, because it made the computer too slow for me. It is then things went wrong. When I rebooted, I got an error say
-
VISTA HOME PREMIUM COMPATIBLE OR NOT
CAN I DOWNLOAD AND USE THE NEW WINDOWS MEDIA PLAYER 12 ON MY VISTA HOME PREMIUM OPERATING SYSTEM
-
ff376pa #acj THE ABOVE IS MY PRODUCT NUMBER I USE a portable edition special dv6845 I uninstalled my nvidia driver but can find a vew one, that appears in the installed site gives error that it can't find compatible hardware Help me