Re: Can't update record - dup_val_on_index

From: Ms. D.H. Harvey <qq45_at_liverpool.ac.uk>
Date: 21 Feb 2000 13:54:45 GMT
Message-ID: <88rg35$l6v$1_at_news.liv.ac.uk>


Phoebe

If this is a forms application there is a possible explanation?

Helen

Paul Dorsey (pdorsey_at_dulcian.com) wrote:
: This is not happening.
: Update commands do not insert new records.
: There is something else in your code that is doing the inserts.

: --
: Paul Dorsey
: Dulcian, Inc.
: (212) 595-7223
: web address: http://www.dulcian.com
: email: pdorsey_at_dulcian.com

: Phoebe <phoebe_at_hkem.com> wrote in message
: news:88or27$rcs$1_at_news.ctinets.com...
: > The customer table only have a primary key on ID.
: > But when i drop the primary key, I can update the record successfully.
: > However it will also insert one more same record into the table.
: > Can anyone tell me how can i update the record without insert one more
: same
: > record??
: > Thanks in advance.
: >
: > Phoebe
: >
: > Paul Dorsey <pdorsey_at_dulcian.com> wrote in message
: > news:LiRr4.15115$pN1.219098_at_news1.rdc1.nj.home.com...
: > > Look at what indexes are on the table.
: > > You probably have a unique index on name.
: > >
: > > --
: > > Paul Dorsey
: > > Dulcian, Inc.
: > > (212) 595-7223
: > > web address: http://www.dulcian.com
: > > email: pdorsey_at_dulcian.com
: > >
: > >
: > > Phoebe <phoebe_at_hkem.com> wrote in message
: > > news:88oec7$nm8$1_at_news.ctinets.com...
: > > > Dear all,
: > > >
: > > > I am writing application to update the record. I try to update the
: > > > record when the "save" button pressed. But it throws an exception :
: > > > dup_val_on_index
: > > >
: > > > cursor cur_cus is select * from customer
: > > > where :id = id
: > > > for update nowait;
: > > > val_cus cur_cus%rowtype;
: > > >
: > > > if cur_cus%found then
: > > > update customer set name = :name,
: > > > address = :address
: > > > where id = :id;
: > > > commit;
: > > >
: > > > Can anyone tell me why dup_val_on_index raised when i update the
: record
: > ??
: > > > Thanks in advance.
: > > >
: > > > Phoebe
Received on Mon Feb 21 2000 - 14:54:45 CET

Original text of this message