Oracle forms error frm-40508: unable to insert record
Hi Everyone,
I have been having this problem for 2 weeks and I realize that I spent alot of time I couldn't get to fix the problem so I need your help.
Here is my situation. First, I installed Oracle 10g in my laptop with Oracle forms10g and Oracle forms904i. I had oracle_home folder as the top level structure then I have inside oracle folder, Oracle10g in it own folder, Oracle9i release2 in it own folder. then I created the user account "student" using the system/manager account finally I granted privilleges as follow:
GRANT ALL PRIVILLEGES
TO student
WITH ADMIN OPTION;
this was working perfecty I didn't need to grant objects privilleges such as
GRANT INSERT, UPDATE, DELETE
ON customers
TO student;
Then I created a form Application prototype and it works well I could Insert, Update and Delete but now I am creating an e-commerce application prototype I created an new account using a system/manager account as I did previously and grant all privilleges. When I try to grant object privileges the message that I receive says ORA-01919 : role 'INSERT' doesn't exist
When I run the application I am unable to insert the record through forms I get message frm-40508 Orcle error: unable to insert record.
I deinstall the Oracle and clean my laptop and did a clean installation using only Oracle Server10g and Oracle Developer10g I am getting the same message frm-40508.
Can someone please help me on this. the insert command that I am running is a simple one such as
INSERT INTO customers
VALUES( block_name.field_name, ....);
COMMIT;
frm 40735:When button pressed trigger raised unhanded exceptionplease help me to solve this>
The FRM-40735 is a generic Unhandled Exception. Please post the full error message so we can better help you.
Craig B-)
If someone's response is helpful or correct, please mark it accordingly.
Similar Messages
-
Handling oracle forms errors (frm-nnnnn) locally
is there a way to handle an oracle form error (e.g. frm-40508) locally in a way similar to handle oracle database errors.
e.g.
procedure insert_something is
insert_error exception;
pragma exception_init(insert_error,-40508);
begin
:c1.a := 1;
:c1.b := 2;
commit_form;
exception
when insert_error then
<handle insert error on c1 block>;
end;
Edited by: mojo on Oct 7, 2008 4:34 AMby locally i mean within the pl/sql block that will have raised the error.
an example i encoutnered recently, but by no means the only occasion i have wished such things:
function mseRecStatus returnvarchar2 is
rtnChar varchar2(32);
begin
rtnChar := get_record_property(mouseRec,mouseBlock,status);
return rtnChar;
end;
This is called from a pre-pop-menu trigger. mouseRec and block are calculated previously. A right-click on a record item below the last record raises error frm-40741 (unable to locate record on block). it would be nice to be able to do something like the following without incolving an on-error trigger:
function mseRecStatus returnvarchar2 is
rtnChar varchar2(32);
non_record_clicked exception;
pragma exception_init(non_record_clicked,-40741);
begin
rtnChar := get_record_property(mouseRec,mouseBlock,status);
return rtnChar;
exception
when non_record_clicked then
return null;
end; -
Code change that was backed out, had 1 Kbyte difference in executeable (FMX) size. Same form works fine locally.
I donot see why this error was encountered! FRM-40014: Not enough memory to load the form
In production, forms are rendered through Citrix.
Any suggestions will be helpful...Oracle hasn't supported running Forms in a Citrix environment for a long time. One main reason for the desupport was because most problems reported in this situation were determined to be caused by a problem in the Citrix layer and not Oracle. Oracle Support and development ended up wasting lots of time only to determine that the problem was caused by Citrix.
Does the problem reproduce when not run in a Citrix environment? If not, I would recommend contacting Citrix. If it still reproduces without Citrix, I would recommend continuing to troubleshoot outside of the Citrix environment as this should make the debugging process a little easier. -
[SOLVED] FRM-40508:ORACLE error: unable to INSERT record
Hi all,
I have migrated this form from 4.5 to 10g (Version 10.1.2.0.2 ). This form inserts a record into the database table when all the fields in the form are filled and a button Save is presed.
At the time when I press the Save button, I get this error. FRM-40508:ORACLE error: unable to INSERT record
So I went on to see the "Display Error" from help and found to be the database error, inserting into a table.
The error message is ORA-00932: inconsistent datatypes: expected DATE got NUMBER
The form where I press Save button has 3 date fields and I checked the properties of them and they are Date only.
I also generated to object list report and tried to find some answer, but no use.
Please help me in debugging this form.
Edited by: Charan on Aug 18, 2011 4:05 PMI think you need to get a description of the table and compare all the "database" columns in the form with the ones in the database table to see that the types match. Somewhere there's a mismatch. Also check the block(s) "query data source columns" and see if there's any
columns in there that the type does not match the table. (check the sizes of things too while you're at it.) -
Unable to insert into table Showing error FRM-40508
I want to insert data in text items of form into a table by using procedure in program unit. i declared all the parameters and calling this procedure in When-button-pressed trigger of push-button.it is not showing any compilation error, but run time error FRm-40508 ORACLE Error: Unable to insert the record.
The Table Structure:-
PROB_ID VARCHAR2(50)
PERSON_NAME NOT NULL VARCHAR2(50)
MODULE NOT NULL VARCHAR2(100)
START_DATE DATE
VERSION NOT NULL VARCHAR2(50)
ASSIGNED_BY VARCHAR2(100)
FUNCTIONALITY VARCHAR2(4000)
ERR_TYPE VARCHAR2(150)
ERR_COMPONENT VARCHAR2(100)
ERR_LOCATION VARCHAR2(250)
PROB_DESC VARCHAR2(4000)
PROB_SOLTN VARCHAR2(4000)
STATUS VARCHAR2(100)
END_DATE DATE
and the code is in When-button-pressed
Declare
v_pname char(5);
v_mod char(6);
v_datetime VARCHAR2(9);
v_pid varchar2(50);
v_version varchar2(50);
v_assign varchar2(50);
v_func varchar2(50);
v_etype varchar2(50);
v_ecomp varchar2(50);
v_eloc varchar2(50);
v_pdesc varchar2(50);
v_psoltn varchar2(50);
v_status varchar2(50);
v_edatetime varchar2(50);
uname varchar2(50) := 'fcclog';
pwd varchar2(50) := 'fcclog';
con varchar2(50) := 'orcl';
cursor c1 is select prob_id from log_table;
BEGIN
-- Creating the unique Problem ID by adding all the item value
v_pname := :log_table.pname_lst;
v_mod := :mod_table.mod_name;
v_datetime:= to_char(:log_table.start_date);
--:log_table.prob_id := v_pname||v_mod||v_datetime ;
v_pid := v_pname||v_mod||v_datetime ;
for r in c1 loop
if v_pid = r.prob_id then
v_pid := v_pid + 1;
end if ;
end loop;
:log_table.prob_id := v_pname||v_mod||v_datetime ;
v_pid := :log_table.prob_id;
-- Inserting into database--
v_version := :log_table.version;
v_assign := :log_table.assigned_lst;
v_func := :log_table.funct_txt;
v_etype := :log_table.err_type;
v_ecomp := :log_table.err_component;
v_eloc := :log_table.err_location;
v_pdesc := :log_table.prob_desc;
v_psoltn := :log_table.prob_soltn;
v_status := :log_table.status;
v_edatetime := :log_table.end_date;
log_insert(v_pid,v_pname,v_mod,v_datetime,v_version,v_assign,v_func,v_etype,v_ecomp,v_eloc,v_pdesc,v_psoltn,v_status,v_edatetime);
commit;
exception
when others
then
DBMS_OUTPUT.PUT_LINE(SQLERRM);
rollback;
end;
And the Code in Procedure (log_insert) of Program Unit.
PROCEDURE log_insert(
p_pname varchar2,
p_mod varchar2,
p_datetime VARCHAR2,
p_pid varchar2,
p_version varchar2,
p_assign varchar2,
p_func varchar2,
p_etype varchar2,
p_ecomp varchar2,
p_eloc varchar2,
p_pdesc varchar2,
p_psoltn varchar2,
p_status varchar2,
p_edatetime varchar2)
IS
BEGIN
insert into fcclog.log_table(PROB_ID,PERSON_NAME,MODULE,START_DATE,VERSION,ASSIGNED_BY,FUNCTIONALITY,ERR_TYPE,ERR_COMPONENT,ERR_LOCATION,PROB_DESC,PROB_SOLTN,STATUS,END_DATE)
values(p_pid,p_pname,p_mod ,p_datetime,p_version,p_assign,p_func,p_etype,p_ecomp,p_eloc,p_pdesc,p_psoltn,p_status,p_edatetime);
END; -
Unable to INSERT record but inserting. Forms 4.5 error through Apps 10.7
Hi All,
I have written the following code on save button on form 4.5 which has been used from APPS. I created the master-detail relation also.
It suppose to insert a row into header and then into lines.
Its inserting the row into both the tables but getting the following error in betweeen.
===========
FRM-40508: ORACLE error: unable to INSERT record.
ORA-01400: cannot insert NULL into ("VFI"."VFI_PC_DEFINITION_LINES"."LINE_ID")
===========
I am thinking problem is some where in some default triigers or on insert triggers
but unable to trace it. CAN anybody through a light on this ?
================================================
PROCEDURE VFI_INVPCS IS
i number;
v_item_id number;
v_item_id1 number;
v_temp varchar2;
v_user_id NUMBER := 1111; --fnd_global.user_id;
Lv_ChkFlag VARCHAR2(1);
Lv_UnChkFlag VARCHAR2(1);
ln_header_seq NUMBER;
ln_lines_seq NUMBER;
BEGIN
BEGIN
SELECT inventory_item_id
INTO v_item_id
FROM inv.mtl_system_items
WHERE organization_id = 103
and segment1 = :VFI_PC_DEFINITION_HEADER.parent_inventory_item_id;
SELECT VFI_PC_DEFINITION_HEADER_SEQ.nextval
INTO ln_header_seq
FROM DUAL;
SELECT VFI_PC_DEFINITION_LINES_SEQ.nextval
INTO ln_lines_seq
FROM DUAL;
INSERT INTO VFI_PC_DEFINITION_HEADER( HEADER_ID
,PARENT_INVENTORY_ITEM_ID
,START_DATE
,END_DATE
,CREATED_BY
,CREATION_DATE
,LAST_UPDATED_BY
,LAST_UPDATE_DATE)
VALUES ( ln_header_seq
,v_item_id
,:VFI_PC_DEFINITION_HEADER.start_Date
,:VFI_PC_DEFINITION_HEADER.end_date
,v_user_id
,sysdate
,v_user_id
,SYSDATE
COMMIT; -- header
GO_BLOCK('VFI_PC_DEFINITION_LINES');
LOOP
SELECT inventory_item_id
INTO v_item_id1
FROM inv.mtl_system_items
WHERE organization_id = 103
AND segment1 = :VFI_PC_DEFINITION_LINES.child_inventory_item_id;
First_record;
IF :VFI_PC_DEFINITION_LINES.child_inventory_item_id is not null then
IF :CFY_PTID_FLAG='Y' THEN
Lv_ChkFlag:=:CFY_PTID_FLAG;
INSERT INTO VFI_PC_DEFINITION_LINES( LINE_ID
,HEADER_ID
,PARENT_INVENTORY_ITEM_ID
,CHILD_INVENTORY_ITEM_ID
,CREATED_BY
,CREATION_DATE
,LAST_UPDATED_BY
,LAST_UPDATE_DATE
,CFY_PTID_FLAG)
VALUES ( ln_lines_seq
,ln_header_seq
,v_item_id
,v_item_id1
,v_user_id
,SYSDATE
,v_user_id
,SYSDATE
,Lv_ChkFlag
END IF;
END if;
NEXT_RECORD;
EXIT WHEN :SYSTEM.LAST_RECORD='TRUE';
END LOOP;
message('After Insert Child');
message('After Insert Child');
COMMIT;
END;
================================================not sure on the block structure of your forms.
one would question why you seem to be doing a lot of the default insert work on the press of a button (when-button-pressed).
also if you have a master-detail relationship in the form - why you don't let forms handle the master-detail insert.
seems like you have database database blocks but are almost coding as if they are non-base table blocks. -
Oracle errors frm-40508 &ora-02291
hello
i m having a problem
i have two tables for my project with one of em master and the other a detail one
i m using developer 2000 for frontend
when i try inserting data in the forms developed i encounter an error frm-40508 which says "unable to insert record" the corresponding ora error is ora-02291 which says "integrity constraint violated - parent key not found"
i have a primary key in my master table which is used to connect it to details table through foreign key.feilds for the primary key in master and foreign key in details are same
i dont have any such problem if i input data through sql command insert
plz suggest me some solution to this problem
thnx
nipunHi,
Just try watching is therer ar no unique indexes on that table where u are doing an insert. another reason might be the composite primary key or the combination that might be confusing you.
U can try out adding an exception block to the trigger and try raise when-dup-val-on-index exception
Thanks,
Vishal -
Unable to INSERT record : ERROR
SR # : 3-2184192641
RMS Version 13.1.3
Form : dealmain.fmb
Customer is reporting the following error
"FRM:40508-Oracle error:Unable to INSERT record"
On looking into detail error the following message is displayed
"INSERT INTO deal_threshold( lower_limit,upper_limit,value,total_ind,target_level_ind,reason,deal_id,deal_detail,
create_datetime,last_update_datetime,last_update_id) values(1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11)."
Please advice.Are the values for the columns being supplied from the application? If so check the formats of the columns and corresponding values of the same. If they are matching then check whether a null being inserted for a not null column..
Of course there could be many more reasons for this error.
Give the complete details of the columns, their properties and the values being inserted into the table.
Regards,
Sandy. -
CHILD form error FRM-30100: Block must have at least one primary key item.
Hi friends,
I have increased the DML array of the child block from 1 to 10, but it throws me error:
FRM-30100: Block must have at least one primary key item.
Block: CEC_ADJUSTMENT_RECON
Form: CEC_ADJ
FRM-30085: Unable to adjust form for output.
How does a form know that the table does not have primary key? Is it referring to it?
Thanks a lotI dont understand why do you increase the DML array size..
Because it says in the HELP
Specifies the maximum array size for inserting, updating, and deleting records in the database at one time.
A larger size reduces transaction processing time by reducing network traffic to the database, but requires more memory. The optimal size is the number of records a user modifies in one transaction.
The FRM-30100 comes not because of the above property..
If your query data source type is other than TABLE, it is a must to set at least one database field's PRIMARY KEY ITEM PROPERTY in the block to be a YES. -
Form: FACTORY_ADDRESS :FRM-30085: Unable to adjust form for output.
Hi there,
I have Oracle Enterprise 9i and Developer 10g with Forms on my laptop. I have created a form which runs quite alright from my laptop, but on transferring this form to another computer running Oracle Enterprise 10g and Developer 10g with Forms and with exactly the same backend database schema, it gave me the following error and would not load.
Form: FACTORY_ADDRESS
FRM-30085: Unable to adjust form for output.
What can be wrong?
Many thanks in advance
Cube60You need to recompile your fmb files to fmx when you redeploy your forms in a new major version. What exact version (all the 5 version digits you find when you show the About box in the builder) are running in the two installations?
-
Error : FRM-41316: cannot set insert allowed property of disabled item
Hi Forum,
I have a requirement to making the following field non editable Ship Confirm Rule+ in Order Management-->"Release Sales Orders"-->"Shipping" tab
I tried to achieve this using form personalization using the below condition and action
Trigger Event - WHEN-NEW-ITEM-INSTANCE
Trigger Object - RELEASE.DOC_NAME
Condition - :RELEASE.PICKING_RULE is not NULL
Processing Mode - Both
Action Type - Property
Object Type - Item
Target Object - RELEASE.SHIPCONFIRM_RULE_NAME
Property Name - ENABLED
Value - FALSE
I could see the field becomes non editable but when i navigate to "Release Sales Orders"-->"Shipping" tab and press tab button on the field "Trip" I am getting the below error
FRM-41316: cannot set insert allowed property of disabled item RELEASE.SHIPCONFIRM_RULE_NAME
Even i have tried with the following Property Names set to " FALSE " but still the field is able to editable
ENTERABLE
ENTERABLE(APPLICATIONS COVER)
INSERT_ALLOWED
INSERT_ALLOWED(ITEM-INSTANCE)
UPDATE_ALLOWED
UPDATE_ALLOWED(ITEM-INSTANCE)
Please help me to resolve this issue.
Thanks in advance
Regards,
CSKHi Francoiq,
Thanks, As you advised I will post this in E-Business Suite
Regards,
CSK -
Hi All
i have a table in that table
i have colums
customer_name
customer_id
customer_add
customer_contact_no
hI HERE customer_name is unique_key
i want when i type duplicate customer_name then (which is already stored in database)
message('customer already exist');
but i get this error frm:40508
please guide
thanks and regards
vikasIn PRE-INSERT trigger check if the Customer already exists or not if exists then give a message as:
declare
cursor c_exists is
select 1
from customer
where customer_name = :customer.customer_name;
begin
open c_exists;
fetch c_exists into v_exists;
close c_exists;
if v_exists = 1 then
message('customer already exist');
raise form_trigger_failure;
end if;
end;You can also do the same is WHEN-VALIDATE-ITEM trigger for customer_name.
Hope this helps.
Edited by: Arif Khadas on Apr 15, 2010 4:10 PM -
See error Frm-40105 : unable to resolve reference to item 20.
hi master
sir when i put this code on when_button_press then give this error
go_block('emp');
enter_query;
:emp.deptno := 10;
execute_query;
error
Frm-40105 : unable to resolve reference to item 20.
sir please give me idea
Thanking youFrm-40105
Cause: Runtime error. A GO_ITEM statement references a nonexistent item.
Which suggests that there might be some code in your form which causes this error (in)directly. -
Hi
when trying to insert a record in a form builder application I getted the following
error
FRM-40508: ORACLE error: unable to INSERT record.
Is the reason that I have not the authority to enter by by system account althought
I have granted dba to scott and that successed ?
To get a full overview of my problem please see my previous thread.
thanks for adavancevolberg wrote:
in most cases you forget a required field.
Press Shift+F1 to get the error message in detailsql statements in error
INSERT INTO STUDENTS(STUD_ID,STUD_NAME) VALUES (:1,:2)
error
ORA-00001: unique constraint (ELHADI.SYS_C005462) violated
Edited by: VANPERSIE on Aug 29, 2008 5:16 PM -
Updating detail record and getting multiple 'UNABLE TO INSERT RECORD' msgs
Help! We have 2 datablocks, master and detail block with relation defined. Master is defined with view based on database joins; detail is view based on table.
When I update the record in detail block, error message 'UNABLE TO INSERT RECORD' appears four times, then I get transaction complete: 5 records applied and saved, where the one record successfully updates. Why are we getting four records with insert errors and one record update? We don't want to work directly on the table, but why can't we use the view? please help.The UNABLE TO INSERT record will be accompanied by more information if you press the Display Error key. Your form commit processing should stop when it gets an error like this, the fact that it doesn't implies that somewhere in your code you are not checking for FORM_SUCCESS before continuing doing something else.
This sounds quite involved, we would need to have more information about what records are queried and what's being changed on them to cause the commit.
Maybe you are looking for
-
Don't know power on password for hp touchsmart 520-1020 windows 7 64 bit
My touchsmart 520-1020 was powered off and when it came back on it was asking for a power on password. Can anyone help me with this? Please? when i enter a random password three times it doesn't give me a code. it shows a key each time i press enter
-
my iphone 4 only turns on when its plugged into a wall and when it finally turns on it lasts for about a minute then it turns off and while its on the signal says searching, what should i do?
-
Fonts problem after I converted to pdf from .ps file
I have completed a .ps file and then use the acrobat distiller to convert to pdf file and resulted in unreadable text. See below comments from the distiller: Source: /Users/chanrick/Desktop/HKCN-Energy3.ps Destination: /Users/chanrick/Desktop/HKCN-En
-
Group by trunc(date)
Hi, lets say I have a source table like this Customer _ TimeStamp ________ BillAmount 001 ______ 01/01/2012 11:00 __ 100,00 001 ______ 01/01/2012 17:00 __ 150,00 I want to load a destination table like this Customer _ Date ________ BillAmount 001 ___
-
Asfunction, cursor states, and moviclips...oh my
Hello all. I've ran into a bit of a snag and I'm thinking the obvious is sitting right in front of me... I have a dynamic movieclip that is created to serve as a container for a dynamically created textfield. The textfield has html text. Within that