Home » Developer & Programmer » Forms » Help whith Forms 6.0!
Help whith Forms 6.0! [message #443790] Wed, 17 February 2010 05:46 Go to next message
MiguelFT
Messages: 6
Registered: February 2010
Junior Member
Hi all!

I have a problem.

I am working with forms 6.0 and i have an error.

This error is:

FRM-40508: ORACLE ERROR: unable to INSERT record

and if i see the help...

ORA-00001: unique constraint (MIGUEL.SYS_C003122) violated.

but my primary key don't exist. I tested: "disabled contraint", "drop contraint" and nothing !!! Sad

Need help plis Sad

Thanks!!

P.D. Sorry for my english, i'am writing from Spain Wink
Re: Help whith Forms 6.0! [message #443793 is a reply to message #443790] Wed, 17 February 2010 06:17 Go to previous messageGo to next message
cookiemonster
Messages: 12320
Registered: September 2008
Location: Rainy Manchester
Senior Member
Oracle doesn't make these things up. Bare in mind that unique constraints don't have to be primary keys.

Use these queries to gete details of your constraint:
SELECT * FROM user_constraints WHERE constraint_name = 'SYS_C003122';
SELECT * FROM user_cons_columns WHERE constraint_name = 'SYS_C003122';

Re: Help whith Forms 6.0! [message #443809 is a reply to message #443793] Wed, 17 February 2010 06:57 Go to previous messageGo to next message
MiguelFT
Messages: 6
Registered: February 2010
Junior Member
Hi!!

See:

OWNER CONSTRAINT_NAME TABLE_NAME
------------------------------ ------------------------------

COLUMN_NAME

POSITION
----------
MIGUEL SYS_C003122 ALUMNOS
COD_ALUM
1

[Updated on: Wed, 17 February 2010 06:57]

Report message to a moderator

Re: Help whith Forms 6.0! [message #443817 is a reply to message #443790] Wed, 17 February 2010 07:26 Go to previous messageGo to next message
cookiemonster
Messages: 12320
Registered: September 2008
Location: Rainy Manchester
Senior Member
Do us a favour next time you post the results of a query - use code tags, it makes it more readable - see the orafaq forum guide if you're not sure how.

So you've got a unique constraint on the COD_ALUM column, what's the problem?
Re: Help whith Forms 6.0! [message #443818 is a reply to message #443809] Wed, 17 February 2010 07:31 Go to previous messageGo to next message
Littlefoot
Messages: 20827
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This is USER_CONS_COLUMNS.

What about USER_CONSTRAINTS?

Also, perhaps unique constraint doesn't exist, but you have created unique index on that column.

Create a table and insert some records:
SQL> create table brisime (id number);

Table created.

SQL> insert into brisime (id) values (1);

1 row created.

SQL> insert into brisime (id) values (2);

1 row created.

Create unique index and insert a duplicate record (which will fail to insert):
SQL> create unique index ui_b on brisime (id);

Index created.

SQL>
SQL> insert into brisime (id) values (1);
insert into brisime (id) values (1)
*
ERROR at line 1:
ORA-00001: unique constraint (SCOTT.UI_B) violated

Check USER_CONSTRAINTS (empty):
SQL> select * from user_constraints where table_name = 'BRISIME';

no rows selected

Check USER_INDEXES:
SQL> select index_name, table_name, uniqueness from user_indexes where table_name = 'BRISIME';

INDEX_NAME                     TABLE_NAME                     UNIQUENES
------------------------------ ------------------------------ ---------
UI_B                           BRISIME                        UNIQUE

SQL>
Re: Help whith Forms 6.0! [message #443820 is a reply to message #443790] Wed, 17 February 2010 07:40 Go to previous message
cookiemonster
Messages: 12320
Registered: September 2008
Location: Rainy Manchester
Senior Member
Oh yeah, forgot you could bypass unique constraints.
Previous Topic: ORA-12514: Message 12514 not found; product=RDBMS80; facility=ORA
Next Topic: Oracle Developer Suite 11g?
Goto Forum:
  


Current Time: Thu Sep 29 00:31:37 CDT 2016

Total time taken to generate the page: 0.09904 seconds