Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Cached updates
Sat, Aug 7 2010 3:38 AMPermanent Link

Hershcu Sorin

Hello

I have a simple m/d tables wich I try to save using cached updates method

The code look like this:
procedure TForm1.btnOpenDataClick(Sender: TObject);
begin
 tbTlnCats.Open;
 tbTlnCatsDtl.Open;
 tbTlnCats.Append;
 tbTlnCatsDtl.BeginCachedUpdates;
end;

procedure TForm1.tbTlnCatsNewRecord(DataSet: TDataSet);
begin
 tbTlnCatsId.AsInteger := dmMain.GenerateNewId('VCounter', 'NextNoTC');
 tbTlnCatsTlunaId.AsInteger := 100;
 tbTlnCatsMoedLkd.AsDateTime := Date;
end;

procedure TForm1.btnAddSomeClick(Sender: TObject);
var
 i: Integer;
begin
 for I := 0 to 2 do
 begin
   tbTlnCatsDtl.Append;
   tbTlnCatsDtlMoedOpr.AsDateTime := Date;
   tbTlnCatsDtl.Post;
 end;
end;

procedure TForm1.tbTlnCatsDtlNewRecord(DataSet: TDataSet);
begin
 tbTlnCatsDtlTlnCatsId.AsInteger := tbTlnCatsId.AsInteger;
end;

procedure TForm1.SaveClick(Sender: TObject);
begin
 tbTlnCats.Post;
 tbTlnCatsDtl.ApplyCachedUpdates;
end;

The detail table is attached to a dbgrid.
If I add records on the dbgrid and save every thing is fine.
But if I press the btnAddSome and after that edit other fields, from the
detail table, on  the dbgrid,
those fields aren't saved.

Thanks
Sorin




Tue, Aug 10 2010 4:46 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Sorin,

<< I have a simple m/d tables wich I try to save using cached updates method
>>

Could you send me a sample project that demonstrates the problem ?  The code
is missing some critical elements like the M-D linkages.

--
Tim Young
Elevate Software
www.elevatesoft.com
Wed, Aug 11 2010 2:28 AMPermanent Link

Hershcu Sorin


"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message
> Could you send me a sample project that demonstrates the problem ?  The
> code is missing some critical elements like the M-D linkages.

This is the sample project.
I'll post the .dfm file on the binaries group and hope it will clarify the
problem.

Thanks
Sorin

Thu, Aug 19 2010 1:53 AMPermanent Link

Hershcu Sorin

Hello Tim

Do you have any information on that issue?

Is the e.g on the binaries group sufficient or need more?

Thanks
Sorin

Mon, Aug 23 2010 7:41 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Sorin,

<< Do you have any information on that issue?

Is the e.g on the binaries group sufficient or need more? >>

I'll have to look at it still.  I'll let you know in the next day what I can
find.

--
Tim Young
Elevate Software
www.elevatesoft.com
Wed, Aug 25 2010 7:27 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Sorin,

<< Is the e.g on the binaries group sufficient or need more? >>

Could you please post or send me the complete source code ?  You're giving
me bits and pieces - I've got the .dfm and part of the .pas, but not the
interface for the .pas, and I don't have the time to recreate the interface
from the .dfm.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image