🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.database.win32
5 messages
5 total messages Started by Hubert Anemaat Wed, 02 Jul 2008 08:33
TDataSet.OnNewRecord: TDataSet.Insert or TDataSet.Append
#23
Author: Hubert Anemaat
Date: Wed, 02 Jul 2008 08:33
8 lines
1054 bytes
Hello,

How can my Delphi application see the difference between a 
TDataSet.Insert and TDataSet.Append in the method TDataSet.OnNewRecord ?

Thanks,

Hubert
Re: TDataSet.OnNewRecord: TDataSet.Insert or TDataSet.Append
#24
Author: Paul Hughes
Date: Wed, 02 Jul 2008 10:15
11 lines
1351 bytes
"Hubert Anemaat" <hubert@anemaat.nl> wrote in message 
news:486b3d4c$1@newsgroups.borland.com...
> Hello,
>
> How can my Delphi application see the difference between a TDataSet.Insert 
> and TDataSet.Append in the method TDataSet.OnNewRecord ?
>
Have a look at the TDataSet.State property and test for dsInsert or 
dsAppend.

Regards, Paul.
Re: TDataSet.OnNewRecord: TDataSet.Insert or TDataSet.Append
#25
Author: Hubert Anemaat
Date: Thu, 03 Jul 2008 08:00
20 lines
1486 bytes
Hello Paul,

There is no dsAppend state.

Hubert

Paul Hughes schreef:
> "Hubert Anemaat" <hubert@anemaat.nl> wrote in message 
> news:486b3d4c$1@newsgroups.borland.com...
>> Hello,
>>
>> How can my Delphi application see the difference between a TDataSet.Insert 
>> and TDataSet.Append in the method TDataSet.OnNewRecord ?
>>
> Have a look at the TDataSet.State property and test for dsInsert or 
> dsAppend.
> 
> Regards, Paul.
> 
> 
Re: TDataSet.OnNewRecord: TDataSet.Insert or TDataSet.Append
#26
Author: Paul Hughes
Date: Thu, 03 Jul 2008 09:30
21 lines
1654 bytes
"Hubert Anemaat" <hubert@anemaat.nl> wrote in message 
news:486c870f$1@newsgroups.borland.com...
> Hello Paul,
>
> There is no dsAppend state.
>
> Hubert

Hi Hubert,

I'm sorry, you're quite right. I think I must have been thinking of dsInsert 
versus dsEdit.

Normally, if you are in control of adding the record, you would either be 
calling insert or append. Is it possible you could set a flag here which you 
can check later on in the process?

What is you're trying to accomplish with this? Maybe there's a simpler or 
alternative way to do what you wanted.

Regards, Paul.
Re: TDataSet.OnNewRecord: TDataSet.Insert or TDataSet.Append
#27
Author: Alexandre Machado
Date: Thu, 03 Jul 2008 11:48
17 lines
1409 bytes
Hubert Anemaat escreveu:
> Hello,
> 
> How can my Delphi application see the difference between a 
> TDataSet.Insert and TDataSet.Append in the method TDataSet.OnNewRecord ?
> 
> Thanks,
> 
> Hubert

There is no way using TDataSet properties/events. Checking VCL source 
code (DB.PAS) you can see that TDataSet.Insert and TDataSet.Append 
methods are quite the same.
And worse, VCL won't let  you override those methods in you own custom 
descendant.

Regards
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads