BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Update affected more than 1 record error

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
Rudolf Sianto
Guest





PostPosted: Mon Feb 21, 2005 7:05 am    Post subject: Update affected more than 1 record error Reply with quote




Hi all,

I am using Delphi 7.0 with dbExpress and client dataset. When updating a record that contains Oracle 9i fields:
is_active number(1) default 0,
access_level number(1) default 0,
for example from 1 to 5, I got 'Update affected more than 1 record'. But this problem does not raise when updating other string field and when inserting new record. This is apply to other records. I suspect this behaviour related to field type of number(1) above.

Excerpt of DM Functions:

procedure TUserDM.UpdateData();
begin
cdsUser.Post();
end;

procedure TUserDM.cdsUserAfterPost(DataSet: TDataSet);
begin
cdsUser.ApplyUpdates(-1);
end;

Any idea what cause this problem ?

Rudolf
Back to top
Bas van Beek
Guest





PostPosted: Mon Feb 21, 2005 10:31 am    Post subject: Re: Update affected more than 1 record error Reply with quote



Rudolf Sianto wrote:
Quote:
Hi all,

I am using Delphi 7.0 with dbExpress and client dataset. When updating a record that contains Oracle 9i fields:
is_active number(1) default 0,
access_level number(1) default 0,
for example from 1 to 5, I got 'Update affected more than 1 record'. But this problem does not raise when updating other string field and when inserting new record. This is apply to other records. I suspect this behaviour related to field type of number(1) above.

Are these the only fields in your table? if so... the problem is that
you need some sort of unique identifier (like a primary key field).

Bas

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.