Yii Framework Forum: Problem with DB - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Problem with DB Rate Topic: -----

#1 User is offline   kitty10 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 139
  • Joined: 13-April 10

Posted 26 April 2010 - 03:04 AM

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1 OCIStmtExecute: ORA-00001: unique constraint (ORA02.DOCENTE_PK) violated
(ext\pdo_oci\oci_statement.c:146)INSERT INTO docente (LABORATORIO, MATRICOLA, FACOLTA_FACOLTA_ID, DIPART_DIPART_ID, ANAGRA_ANAGRA_ID) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4) RETURNING MATRICOLA INTO :RETURN_ID

Can you help me??
0

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,359
  • Joined: 12-October 09
  • Location:Croatia

Posted 26 April 2010 - 03:07 AM

as it says "unique constraint"

You have to check your existing data and the data you want to insert
Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   kitty10 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 139
  • Joined: 13-April 10

Posted 26 April 2010 - 05:31 AM

View Postmdomba, on 26 April 2010 - 03:07 AM, said:

as it says "unique constraint"

You have to check your existing data and the data you want to insert


What should I do?
I checked the data in the db and upload those and I have the same case for type.I should enter any relationship?
0

#4 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,359
  • Joined: 12-October 09
  • Location:Croatia

Posted 26 April 2010 - 05:47 AM

Can't help you without seeing your table and index structure and what data you have and want to insert
but
for example... if you create a primary key on a field LABORATORIO you CANNOT insert two rows with the same value for that field
Find more about me.... btw. Do you know your WAN IP?
0

#5 User is offline   kitty10 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 139
  • Joined: 13-April 10

Posted 26 April 2010 - 06:09 AM

View Postmdomba, on 26 April 2010 - 05:47 AM, said:

Can't help you without seeing your table and index structure and what data you have and want to insert
but
for example... if you create a primary key on a field LABORATORIO you CANNOT insert two rows with the same value for that field


My primary key is MATRICOLA...
i have this problem when I use a form for the research....not when I insert a new docente
0

#6 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,359
  • Joined: 12-October 09
  • Location:Croatia

Posted 26 April 2010 - 06:19 AM

View Postkitty10, on 26 April 2010 - 06:09 AM, said:

i have this problem when I use a form for the research....not when I insert a new docente


I don't understand what you mean by research?

in the error says:

(ext\pdo_oci\oci_statement.c:146)INSERT INTO docente (LABORATORIO,

so it's trying to add new data to the table
Find more about me.... btw. Do you know your WAN IP?
0

#7 User is offline   kitty10 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 139
  • Joined: 13-April 10

Posted 26 April 2010 - 08:07 AM

View Postmdomba, on 26 April 2010 - 06:19 AM, said:

I don't understand what you mean by research?

in the error says:

(ext\pdo_oci\oci_statement.c:146)INSERT INTO docente (LABORATORIO,

so it's trying to add new data to the table


I have a form search docente with 4 textbox
Matricola
Facolta
Dipartimento
Anagra Anagra

and I have this error
CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1 OCIStmtExecute: ORA-00001: unique constraint (ORA02.DOCENTE_PK) violated
(ext\pdo_oci\oci_statement.c:146)INSERT INTO docente (LABORATORIO, MATRICOLA, FACOLTA_FACOLTA_ID, DIPART_DIPART_ID, ANAGRA_ANAGRA_ID) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4) RETURNING MATRICOLA INTO :RETURN_ID
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users