Board index » delphi » "update failed"

"update failed"

Hello all,

I add a record to a table using applyupdates. Say immediately afterwards I
want to return to that record and maybe modify it and then try to save it
again. On doing the following I get an 'Update failed' error. What am I
doing wrong?

with Table1 do
begin
  Open;
  Last;
  Edit;
end;
.
.
.
.
.
Table1.ApplyUpdates;

Thank you,
Fats

 

Re:"update failed"


Hi!

You need ApplyUpdates in Transactions only.

Use for this problem:

Table1.Post

Schustereder Michael

"Fatima" <ffel...@yebo.co.za> schrieb im Newsbeitrag
news:8cj15e$288$1@ctb-nnrp1.saix.net...

Quote
> Hello all,

> I add a record to a table using applyupdates. Say immediately afterwards I
> want to return to that record and maybe modify it and then try to save it
> again. On doing the following I get an 'Update failed' error. What am I
> doing wrong?

> with Table1 do
> begin
>   Open;
>   Last;
>   Edit;
> end;
> .
> .
> .
> .
> .
> Table1.ApplyUpdates;

> Thank you,
> Fats

Re:"update failed"


Thanx Michael   ....   that did the trick!
Quote
Michael Schustereder <michi.schustere...@ivnet.co.at> wrote in message

news:38edf0d2.0@news.profinet.at...
Quote
> Hi!

> You need ApplyUpdates in Transactions only.

> Use for this problem:

> Table1.Post

> Schustereder Michael

> "Fatima" <ffel...@yebo.co.za> schrieb im Newsbeitrag
> news:8cj15e$288$1@ctb-nnrp1.saix.net...
> > Hello all,

> > I add a record to a table using applyupdates. Say immediately afterwards
I
> > want to return to that record and maybe modify it and then try to save
it
> > again. On doing the following I get an 'Update failed' error. What am I
> > doing wrong?

> > with Table1 do
> > begin
> >   Open;
> >   Last;
> >   Edit;
> > end;
> > .
> > .
> > .
> > .
> > .
> > Table1.ApplyUpdates;

> > Thank you,
> > Fats

Other Threads