 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Rudolf Sianto Guest
|
Posted: Mon Feb 21, 2005 7:05 am Post subject: Update affected more than 1 record error |
|
|
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
|
Posted: Mon Feb 21, 2005 10:31 am Post subject: Re: Update affected more than 1 record error |
|
|
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 |
|
 |
|
|
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
|
|