Oracle Forms' Stored Procedure Data Blocks
i'm using the 6i demo procedure code to populate the data from the peocedure. it is retrieving data fine. but whn it will creates the following procedure. onece it shows me only insert procedure but after that i didnt find any procedure.
Query-procedure
Insert-procedure
Update-procedure
Delete-procedure
Lock-procedure
thanks in advance
Shakeel
yes i know insert, update delete and lock proceduer are written on the procedure packege but after block wizard these procedure automerically created on block level.
Similar Messages
-
How to Insert date in 'DD/MM/YYYY' format in oracle using stored procedure?
Hi
How to Insert date in 'DD/MM/YYYY' format in oracle using stored procedure?
This is my Input data.
11/25/2007.
By using below query, it is inserted into database.
sql>Insert into tblname values(to_date('11/25/2007','MM/DD/YYYY'));
But using stored procedure, the same query is not running.
It shows error like
ORA-01843: not a valid month ORA-06512: at line 1
Procedure:
create or replace procedure Date_Test(datejoin in DATE) is
begin
insert into datetest values(to_date(datejoin,'MM/DD/YYYY'));
end Date_Test;
I had used 'nls_date_language = american' also.
Prcodeure is created but not worked in jsp. The same error is thrown.
Pls provide a solutionThis might help you....
SQL> Create Table DateTest(col1 Date);
Table created.
Elapsed: 00:00:00.00
SQL> create or replace procedure Date_Test(datejoin in DATE) is
2 begin
3 insert into datetest values(to_date(datejoin,'MM/DD/YYYY'));
4 end ;
5 /
Procedure created.
Elapsed: 00:00:00.00
SQL> exec Date_Test('11/25/2007');
BEGIN Date_Test('11/25/2007'); END;
ERROR at line 1:
ORA-01843: not a valid month
ORA-06512: at line 1
Elapsed: 00:00:00.00
SQL> exec Date_Test(To_Date('11/25/2007','mm/dd/yyyy'));
BEGIN Date_Test(To_Date('11/25/2007','mm/dd/yyyy')); END;
ERROR at line 1:
ORA-01843: not a valid month
ORA-06512: at "CTBATCH.DATE_TEST", line 3
ORA-06512: at line 1
Elapsed: 00:00:00.00
SQL> create or replace procedure Date_Test(datejoin in DATE) is
2 begin
3 insert into datetest values(datejoin);
4 end ;
5 /
Procedure created.
Elapsed: 00:00:00.00
SQL> exec Date_Test(To_Date('11/25/2007','mm/dd/yyyy'));
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
SQL> Select * from DateTest;
COL1
25-NOV-07
Elapsed: 00:00:00.00
SQL> create or replace procedure Date_Test(datejoin in VarChar2) is
2 begin
3 insert into datetest values(to_date(datejoin,'mm/dd/yyyy'));
4 end ;
5 /
Procedure created.
Elapsed: 00:00:00.00
SQL> exec Date_Test('11/25/2007');
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
SQL> select * from DateTest;
COL1
25-NOV-07
25-NOV-07
Elapsed: 00:00:00.00
SQL> -
How to use order by in stored procedure base block?
How to use order by in stored procedure base block? I need to change order by dynamically
Use SET_BLOCK_PROPERTY('BLOCK_NAME',ORDER_BY,'COLUMN_NAME1, COLUMN_NAME2');
-
Hello, I am new to the forum and was hoping someone here would be able to help me with an issue I have run into or help me find someone who could.
I was recently working on a security assessment of a website and I found a PDF document for an employement application that appears to store old data within the code of the document. To explain further:
- I found the PDF form document on the website. When downloaded and opened with Reader it appears blank. The document is avaiable to download and then you are directed to email it to HR, so there is no online submission on the website.
- When opened in a text editor it displays mostly encoded text and numbers but there is portion of the document with lines that correspond to the fields in the document and contain information from previous instances of the document that has been filled out.
Has anyone encountered this before? If yes are there any remediations for a PDF form storing unwanted data within the code of the document?
Thanks in advance and sorry if I have posted this in the wrong location.Filling in online forms should never allow the form to be saved back to the website. Usually such a form (or any online document) would go to the user's browser's temp folder, and be saved in there. I don't know how it was possible that user data got back onto the web server form (unless it was originally uploaded like that).
What I would do if I encountered such a situation
upload the clean, empty form
make sure the file is read-only
test it by filling in the form online
see if the original form has been altered in any way -
Creating a Oracle 10g stored procedure as a datasource for crystal 9 repor
Can someone direct me to instructions or information on how to create a Oracle 10g stored procedure as a datasource for my Crystal Reports 9.0 report?
i've found this example for you
http://www.pdssoftware.com/newsletter/mar07/page6.htm
and you could be able to get the guides from the SAP guide website for the products
http://help.sap.com/businessobject/product_guides/
hope this was helpful
good luck
Amr -
Two rows instead of one in the database when form with 2 data blocks.
Hi All,
I have created a form having 2 data blocks
data block one to populate table A
data block two to populate table B .
now when i save the data after pressing the save option ....i find 2 records instead of one in the database table A and Table B.
it should have been just one per table ....can some one suggest pls
Sunnyok : step by step :
do you have a trigger created named "ON-INSERT" on
the block?Many thanks for your support....
I do not have an ON-insert trigger.....
I will explain my scenerio.....
I have 2 data blocks one-below the other in the form
accessing 2 different tables....
now on the canvas of this form I have added a
button....and on that button i have written a trigger
'when-button-pressed' Trigger....
it takes the data from the various text_items of the
form and inserts them into their corrosponding
tables....and I have added 'COMMIT' at the end this
trigger
so when I press this button ....the data 2 records
get inserted into the 2 tables instead of one each..
TIA
Sunnythe above form looks something like this.....
-------------------------------------------------------------------------------------------------------|
|------------------------------------------------------------------------------------------------------|
| |
| ---data_block1------------------------------------------------------ |
| | | |
| | some data entry here for emp1 table | |
| |__________________________________________ | |
| |
| |
| |
| ---data_block2------------------------------------------------------ |
| | | |
| | some data entry here for dept1 table | |
| |__________________________________________ | |
| |
| button1 |
|------------------------------------------------------------------------------------------------------- -
Problem Querying Oracle Forms Using a Date Field and a Format Mask
Hello,
We are experiencing a problem with Oracle Forms that I was wondering if you can help me with.
We have several Forms that have single database blocks assigned to Oracle tables. The Forms are queryable and one of the fields we’re querying on is assigned to a field on the base table which is Not Null and has a Type of DATE. We are storing date/time information in this field on the database table. The item on the form is set up as a Date field with a Maximum Length of 7, a Format Mask ‘MMDDYY’ and having a Query Length of 10.
We’ve seen a discrepancy in how these fields are used to query the base table block. On some user’s computers they are able to enter a 6 digit date followed by the % sign (e.g. ‘091808%’) and they get the expected results. Other users get ‘FRM-40301: Query caused no records to be retrieved. Re-enter’. Do you know why we are experiencing this difference?
- The Oracle Database version we are running is Release 10.1.0.5.0.
- The Forms Developer version that we’re experiencing the problem with is 4.5.10.15.2
Thanks,
KrisThere is no obvious reason that I can see.
Version 4.5 is very old so you might have problems calling Oracle Support. If you can reproduce the same problem o0n 10.1.2 you should call have them analyze the problem. -
Environment- Oracle DB 8.1.7 (Sun) - JDBC OCI 8.1.7 - Application Server (WebLogic 6.0 or 6.1)QuestionHow to pass oracle collection data types from PL/SQL stored procedures to Weblogic java program as in/out stored procedures parameters. I am hitting oracle error 2006 unidentified data type trying to pass the following data types:-o java.sql.Structo java.sql.Arrayo oracle.sql.STRUCTo oracle.sql.ARRAYo oracle.jdbc2.Structo oracle.jdbc2.Arrayo any class implemented oracle.jdbc2.SQLData or oracle.sql.CustomDatumInformationAbout PL/SQL stored procedure limitation which only affects the out argument types of stored procedures calledusing Java on the client side. Whether Java methods cannot have IN arguments of Oracle 8 object or collection type meaning that Java methods used to implement stored procedures cannot have arguments of the following types:o java.sql.Structo java.sql.Arrayo oracle.sql.STRUCTo oracle.sql.ARRAYo oracle.jdbc2.Structo oracle.jdbc2.Arrayo any class implemented oracle.jdbc2.SQLData or oracle.sql.CustomDatum
this is becoming a mejor problem for me.And are you storing it as a blob?
Oracle doesn't take varchars that big.
And isn't LONG a deprecated field type for Oracle?
From the Oracle docs......
http://download-west.oracle.com/docs/cd/B13789_01/server.101/b10759/sql_elements001.htm#sthref164
Oracle strongly recommends that you convert LONG RAW columns to binary LOB (BLOB) columns. LOB columns are subject to far fewer restrictions than LONG columns. See TO_LOB for more information. -
I want to create a form with 3 fields that will allow info to be entered and have a button. When the button is clicked, I want the form fields to be used with the stored procedure. How can I call this parameter driven stored procedure from this form?
Hi, I have following questions regarding this posting:
1. What is the block_name refering below? I used oracle portal to build the form based on tables. I have item types such as textbox, combobox. Each item has a label name. I am assuming that the item1, item2, item3 you are refering below are the the lable names for those items. Is it correct?
2. Do I put the code - myproc(:block_name.item_name1,:block_name.item_name2,:block_nam.item_name3); in the PL/SQL Code section or in the PL/SQL button Event Handler section?
Thanks.
Daphne
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Sanjay Motiramani ([email protected]):
Hi
To pass parameter from Form to stored proc. You can refere
:Block_name.item_name
e.g. if your procedure name is myproc then you can refere
myproc(:block_name.item_name1,:block_name.item_name2,:block_nam.item_name3);
Hope this help<HR></BLOCKQUOTE>
null -
Get System Stored Procedure Data in variables
Hello all Forum Members,
I am new to SQL Server.
My Requirement is that i want to get sp_helpuser procedure data in select query variables.
is it Possible?
Please Help.Hi Prashanth,
It works as per my requirement.
But, Can it be achieved without creating table type variable i.e by creating simple variables ?
Thanks very much for the reply.
its possible to get stored procedure resultset using a select as per method 2 below
http://sqlblogcasts.com/blogs/madhivanan/archive/2007/11/26/select-columns-from-exec-procedure-name-is-this-possible.aspx
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Bug? SQL server 7 - Oracle 8i stored procedures
I'm having a problem converting some SQL 7 stored procedures to Oracle using MW. The cursor definition appears to be garbage in some cases. See example as follows:
*********** SQL 7 stored procedure *********
CREATE PROCEDURE CLCClaim
/* Procedure: CLCClaim */
/* Description: Cascading delete to child tables */
/* Table: CLClaim */
/* Generated: 4/23/01 2:31:21 PM */
@AuditUserId int,
@AuditLctn varchar(20),
@ClaimId int
AS
DECLARE
@Trncnt int,
@ErrorNumber int,
@Id int,
@Rows int,
@ClsnId int
SELECT @ErrorNumber = -1
/* Save transaction count value */
SELECT @Trncnt = @@TRANCOUNT
/* Issue begin transaction if not already in a transaction */
If @Trncnt = 0
BEGIN TRANSACTION T1
/* Build a cursor for finding child CLClaimAtchm rows */
DECLARE CLClaimAtchmCursor Cursor For
SELECT ClaimAtchmId, ClsnId
FROM dbo.CLClaimAtchm
WHERE ClaimId = @ClaimId
/* Open the cursor */
OPEN CLClaimAtchmCursor
SELECT @ErrorNumber = @@ERROR
If @ErrorNumber <> 0 GoTo ErrorHandler
FETCH Next
FROM CLClaimAtchmCursor
INTO @Id, @ClsnId
... more follows, but this is the gist of it
**** Oracle Procedure created by MW
CREATE OR REPLACE PROCEDURE CLCClaim(
AuditUserId NUMBER ,
AuditLctn VARCHAR2 ,
ClaimId NUMBER )
AS
StoO_selcnt INTEGER;
StoO_error INTEGER;
StoO_rowcnt INTEGER;
StoO_crowcnt INTEGER := 0;
StoO_fetchstatus INTEGER := 0;
StoO_errmsg VARCHAR2(255);
StoO_sqlstatus INTEGER;
Trncnt NUMBER(10,0);
ErrorNumber NUMBER(10,0);
Id NUMBER(10,0);
Rows_ NUMBER(10,0);
ClsnId NUMBER(10,0);
CURSOR CLClaimAtchmCursor IS SELECT omwb_emulation.globalPkg.trancount
FROM CLClaimAtchm
WHERE ClaimId = CLCClaim.ClaimId;
CURSOR CLClaimDiagCursor IS SELECT StoO_error
FROM CLClaimDiag
WHERE ClaimId = CLCClaim.ClaimId;
CURSOR CLClaimAdjdCursor IS SELECT StoO_error
FROM CLClaimAdjd
WHERE ClaimId = CLCClaim.ClaimId;
CURSOR CLSvcLineCursor IS SELECT StoO_error
FROM CLSvcLine
WHERE ClaimId = CLCClaim.ClaimId;
/* Procedure: CLCClaim */
/* Description: Cascading delete to child tables */
/* Table: CLClaim */
/* Generated: 4/23/01 2:31:21 PM */
/* Save transaction count value */
BEGIN
CLCClaim.ErrorNumber := -1;
/* Issue begin transaction if not already in a transaction */
CLCClaim.Trncnt := omwb_emulation.globalPkg.trancount;
IF CLCClaim.Trncnt = 0 THEN
/* Build a cursor for finding child CLClaimAtchm rows */
/* Emulating @@TRANCOUNT functionality in Oracle model */
omwb_emulation.globalPkg.trancount:=omwb_emulation.globalPkg.trancount+1;
SAVEPOINT T1;
END IF;
NULL;/*DECLARE CURSOR CLClaimAtchmCursor */
/* Open the cursor */
BEGIN
StoO_error := 0;
StoO_rowcnt := 0;
StoO_crowcnt := 0;
OPEN CLClaimAtchmCursor;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
StoO_error := SQLCODE;
StoO_errmsg := SQLERRM;
END;
CLCClaim.ErrorNumber := StoO_error;
IF CLCClaim.ErrorNumber <> 0 THEN
GOTO ErrorHandler;
END IF;
BEGIN
StoO_error := 0;
StoO_rowcnt := 0;
StoO_crowcnt := 0;
FETCH CLClaimAtchmCursor INTO CLCClaim.Id, CLCClaim.ClsnId;
EXCEPTION
WHEN OTHERS THEN
StoO_rowcnt := 0;
StoO_selcnt := 0;
StoO_error := SQLCODE;
StoO_errmsg := SQLERRM;
END;
...more follows, but the error is in the SELECT clause of the CURSOR declaration
I'm having to manually fix the CURSOR declarations for these converted procedures.
Is there a fix or workaround to prevent me from growing my collection of gray hairs?
Thanks,
Billy SmithWilliam,
I did a quick check on our latest code and got the following output:
CREATE OR REPLACE PROCEDURE CLCClaim(
AuditUserId INTEGER DEFAULT NULL,
AuditLctn VARCHAR2 DEFAULT NULL,
ClaimId INTEGER DEFAULT NULL)
AS
StoO_selcnt INTEGER;
StoO_error INTEGER;
StoO_rowcnt INTEGER;
StoO_crowcnt INTEGER := 0;
StoO_fetchstatus INTEGER := 0;
StoO_errmsg VARCHAR2(255);
StoO_sqlstatus INTEGER;
Trncnt INTEGER;
ErrorNumber INTEGER;
Id INTEGER;
Rows INTEGER;
ClsnId INTEGER;
CURSOR CLClaimAtchmCursor IS
SELECT ClaimAtchmId, ClsnId
FROM /*standalone*/sa.CLClaimAtchm
WHERE ClaimId = CLCClaim.ClaimId;
/* Procedure: CLCClaim */
/* Description: Cascading delete to child tables */
/* Table: CLClaim */
/* Generated: 4/23/01 2:31:21 PM */
/* Save transaction count value */
BEGIN
CLCClaim.ErrorNumber := -1;
/*[SPCONV-ERR(26)]:('@TRANCOUNT') Global Variable treated as variable*/
/* Issue begin transaction if not already in a transaction */
CLCClaim.Trncnt := CLCClaim.TRANCOUNT;
IF CLCClaim.Trncnt = 0 THEN
/* Build a cursor for finding child CLClaimAtchm rows */
SAVEPOINT T1;
END IF;
NULL;/*DECLARE CURSOR CLClaimAtchmCursor */
/* Open the cursor */
BEGIN
StoO_error := 0;
StoO_rowcnt := 0;
StoO_crowcnt := 0;
OPEN CLClaimAtchmCursor;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
StoO_error := SQLCODE;
StoO_errmsg := SQLERRM;
END;
CLCClaim.ErrorNumber := StoO_error;
IF CLCClaim.ErrorNumber <> 0 THEN
GOTO ErrorHandler;
END IF;
BEGIN
StoO_error := 0;
StoO_rowcnt := 0;
StoO_crowcnt := 0;
FETCH CLClaimAtchmCursor INTO
CLCClaim.Id, CLCClaim.ClsnId;
EXCEPTION
WHEN OTHERS THEN
StoO_rowcnt := 0;
StoO_selcnt := 0;
StoO_error := SQLCODE;
StoO_errmsg := SQLERRM;
END;
IF CLClaimAtchmCursor%NOTFOUND THEN
StoO_sqlstatus := 2;
StoO_fetchstatus := -1;
ELSE
StoO_sqlstatus := 0;
StoO_fetchstatus := 0;
END IF;
END CLCClaim;
If this is not sufficient please give a complete testcase and migration workbench version to support email address: [email protected] so the bug can be reproduced and logged.
Turloch
Oracle Migration Workbench Team -
Execute Oracle Java Stored Procedure in Pro*C
I found this is a very usefull example of calling Java procedure via Pro*C module. You could find the source and instructions at: http://www.oracle.com/technology/sample_code/tech/java/travel/travelschema.htm#user.
Some minor issues arose during installation of C/C++ environment. I use MS Visual Studio 6 and it works just fine. Also you have to be very observant when modifying "procCallJSP.bat" file where SETing environment variables.
I found some flaw in Pro*C "procCallJSP.pc" script. During the execution of "procCallJSP.exe", when you provide not numeric argumet at the command prompt (eg. ` ) it puts the program to infinite loop. It needs an additional check to eliminate such kind of typing. The change needs to applied at line # 142 in "procCallJSP.pc". Other then that it works OK.<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by tomon Lee ([email protected]):
I try to call a stored procedure of oracle8i
in Pro*c using follow statement:
EXEC SQL EXCUTE
BEGIN
insert_date(sysdate,:out_timecode);
END;
END-EXEC;
but when i use "proc SQLCHECK=SEMANTICS test.pc" to compile it ,but it return an
error as follow:
"insert_date must be declared."
but the sample code above come from
oracle8i 8.1.6's documents.
what's wrong with me?<HR></BLOCKQUOTE>
If you have right to exec the insert_date ,Check the database connect set in your cfg file -
Oracle Packaged Stored Procedure
I am failing in an attempt to access an Oracle database using the following php.
The calls I have tested are as follows:-
$query = "begin spPackage.spMemberDetails(:p_number,:cv_memberdetails); end;";
$stmt = OCIParse($conn, $query )
or die('Cannot parse query');
OCIBindByName($stmt,":p_number",$number, -1)
or die('First cannot bind variable');
OCIBindByName($stmt, ":cv_memberdetails", &$array, -1)
or die('Second cannot bind variable');
OR
$query = "begin spPackage.spMemberDetails(:p_number); end;";
$stmt = OCIParse($conn, $query )
or die('Cannot parse query');
OCIBindByName($stmt,":p_number",$number, -1)
or die('First cannot bind variable');
I get the following error message:-
ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'SPMEMBERDETAILS' ORA-06550: line 1, column 7: PL/SQL: Statement ignored
begin spPackage.spMemberDetails(:p_number); end;
^
The 1st part of the stored procedure I am trying to use is as follows:-
CREATE OR REPLACE PACKAGE "BIG"."SPPACKAGE" AS
type memberdetail_type is record (
r_mem_number members.mem_number%type,
r_mem_sname members.mem_sname%type,
r_mem_fname members.mem_fname%type,
r_mem_title members.mem_title%type);
type memberdetail_cur_type is ref cursor return memberdetail_type;
PROCEDURE spMemberDetails(
p_number cards.card_number%type, --varchar2
cv_memberdetails out memberdetail_cur_type);
Please tell me what I am not understanding and where I have gone wrong.
BTW I did not write the stored procedure.
Message was edited by:
user446320See Re: Calling stored procedure from php script.
-- CJ -
Connect the schema via oracle 10g stored procedures
Hi,
How to connect the another schema through the oracle stored procedures?.I have the 3 in parameters like username,password,hoststring
and i have admin password also.For example i have logged to the admin user and i need to execute the procedures with 3 in parameters.i want to connect the another schema through the stored procedures with crenditials(3 in parameters).The stored procedures has been created in admin user.
Please give me your ideas ASAP.
Thanks&Regards
N.SivaramanCreate procedure create_db_link (user, paswword, host) as
begin
execute immediate' CREATE DATABASE LINK TEST CONNECT TO || user || ' IDENTIFIED BY || paswword || ' USING ''' || host || ''';
end;
Create procedure drop_db_link as
begin
execute immediate' DROP DATABASE LINK TEST';
end;
Create procedure main as
begin
create_db_link;
select whateever into v_whatever from TableA@test;
drop_db_link;
end; -
Weblogic 6.1 & Oracle Java Stored Procedures
Hi all
I need to access a EJB deployed into Weblogic 6.1 (It's a mail sender EJB) when an event occurs in a Oracle 8.1.7 DataBase (when a table were updated).
I think the only way to do it is firing a trigger, this trigger uses a Java Stored Procedure that connects with the EJB via JNDI.
And here comes the problem:
must I load the weblogic.jar (25M) into the DataBase through loadjava??
There is no a way to include jars in the Oracle classpath??
Please help
Thanks in advance.
David.Hi,
I want to ask you one thing:
Once the procedure is called is it not executing at the database?The Oracle process handling it(Procedure).So wont that be able to call the trigger as it works in the (Oracle)environment.
So where does the importing of the java classes(Object) is related to
the Trigger invocation....
vicky
Maybe you are looking for
-
Nach jedem Start von CS2 meldet sich die Bridge und fordert einen Internetzugang. Wie kann ich das abstellen? MfG Manfred
-
IChat No Longer Works With Expired MobileMe Trial Accounts?
In the past, you could use an expired .Mac (now MobileMe) trial account's username, to log into and use iChat. But I believe now that this no longer works. Apple must've changed the rules. Can anyone else confirm this? I haven't been able to use iCha
-
Hi, We wish to transfer and edit our VHS tapes to a Canon MVX 350i, transfer it to iMovie and then burn DVDs. We bought this Canon because we were told it would allow us to do as described. (Analogue Digital Converter). However we do not have a cable
-
XI Installation Error - J2EE_ADMIN Password Mismatch
Hello all, I am doing an XI 3.0 SR1 64 bit installation on SUSE Linux/Oracle. I have successfully installed the SAP WebAS 640 Unicode ABAP + J2EE system. The J2EE was installed against client 300, which was a USCV system copy from client 000. All pr
-
Auto increase the rows of Input Text
JDev 11.1.1.5.0 BPM SOA Need to automatically increase the number of rows of an input text component according to the data. If the data is pretty large, display it in multiple rows or if it is small, display it in a single row.