Home » Developer & Programmer » Forms » SEE MY ERROR :FRM-40735 : WHEN-BUTTON-PRESSED TRIGGER RAISED UNHANDLED EXPCEPTION ORA-00001.
SEE MY ERROR :FRM-40735 : WHEN-BUTTON-PRESSED TRIGGER RAISED UNHANDLED EXPCEPTION ORA-00001. [message #173204] Sat, 20 May 2006 04:26 Go to next message
mfa786
Messages: 210
Registered: February 2006
Location: karachi
Senior Member
hi master
sir i put this code in when_button_press event

nsert into opbaltable (chofacc)
(select chofacc from chart_of_account where acc_date='01-JUL-05');
commit;
commit_form;

but system give me this error

FRM-40735 : WHEN-BUTTON-PRESSED TRIGGER RAISED UNHANDLED EXPCEPTION ORA-00001.

please give me idea how in insert data from other table

thank
Re: SEE MY ERROR :FRM-40735 : WHEN-BUTTON-PRESSED TRIGGER RAISED UNHANDLED EXPCEPTION ORA-00001. [message #173209 is a reply to message #173204] Sat, 20 May 2006 04:51 Go to previous messageGo to next message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

hi,
is it because you you wrote
nsert into opbaltable (chofacc) instead of insert into opbaltable (chofacc)
Add i in the beginning to your keyword "nsert"

Also change this line from where acc_date='01-JUL-05'; to where to_date(acc_date, 'dd-mon-yy')='01-JUL-05';

Also you don't need a double commit. One commit is enough to work.

regards.

[Updated on: Sat, 20 May 2006 05:05]

Report message to a moderator

Re: SEE MY ERROR :FRM-40735 : WHEN-BUTTON-PRESSED TRIGGER RAISED UNHANDLED EXPCEPTION ORA-00001. [message #173234 is a reply to message #173209] Sat, 20 May 2006 11:53 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Wouldn't applying TO_CHAR function to the "acc_date" column prevent optimizer to use index on this column (if it exists)? I'd, somehow, rather put it as

WHERE acc_date = TO_DATE('01.07.2005', 'dd.mm.yyyy')

[EDIT] I forgot to answer the OP's question ...
Quote:

ORA-00001 unique constraint (string.string) violated

Cause: An UPDATE or INSERT statement attempted to insert a duplicate key.

Action: Either remove the unique restriction or do not insert the key.

[Updated on: Sat, 20 May 2006 11:56]

Report message to a moderator

Previous Topic: Push Button Image
Next Topic: How can I store picture in database..................
Goto Forum:
  


Current Time: Fri Sep 20 10:33:36 CDT 2024