Board index » delphi » Autoincrement fields aren't updated when CacheUpdates=true

Autoincrement fields aren't updated when CacheUpdates=true

I have a Paradox database with autoincrement key fields. Unfortunately
they aren't updated when Table.CacheUpdates is true. They do so if I
flush the cache with ApplyUpdates, but I want to them to be available
before using this method. Any suggestions?

Thanks in advance

Pawel Suski
p...@polbox.com

Sent via Deja.com http://www.deja.com/
Before you buy.

 

Re:Autoincrement fields aren't updated when CacheUpdates=true


No chance.

--
Greetings,
Carsten Schtte

<p...@my-deja.com> schrieb im Newsbeitrag
news:8eh17s$vu9$1@nnrp1.deja.com...

Quote
> I have a Paradox database with autoincrement key fields. Unfortunately
> they aren't updated when Table.CacheUpdates is true. They do so if I
> flush the cache with ApplyUpdates, but I want to them to be available
> before using this method. Any suggestions?

> Thanks in advance

> Pawel Suski
> p...@polbox.com

> Sent via Deja.com http://www.deja.com/
> Before you buy.

Re:Autoincrement fields aren't updated when CacheUpdates=true


Quote
<p...@my-deja.com> wrote in message news:8eh17s$vu9$1@nnrp1.deja.com...
> I have a Paradox database with autoincrement key fields. Unfortunately
> they aren't updated when Table.CacheUpdates is true. They do so if I
> flush the cache with ApplyUpdates, but I want to them to be available
> before using this method. Any suggestions?

Don't use AutoIncrement fields, code your own.
Quote

> Thanks in advance

> Pawel Suski
> p...@polbox.com

> Sent via Deja.com http://www.deja.com/
> Before you buy.

Re:Autoincrement fields aren't updated when CacheUpdates=true


Hello,

my approach on this, is to use a dedicated table with fields for all
autoincrement numbers. ID numbers, Ordernumbers and so on.
I call it IDMaster.
In Table1.OnNewRecord event I copy the current number from IDMaster table.
Then you can update IDMaster with a new number in the Table1.BeforePost
event.
This causes the number to increase only if  Table1.Post, and not if
Table1.Cancel.

This also works fine regardless of CachedUpdates.

:)
Kai Inge

<p...@my-deja.com> skrev i meldingsnyheter:8eh17s$vu...@nnrp1.deja.com...

Quote
> I have a Paradox database with autoincrement key fields. Unfortunately
> they aren't updated when Table.CacheUpdates is true. They do so if I
> flush the cache with ApplyUpdates, but I want to them to be available
> before using this method. Any suggestions?

> Thanks in advance

> Pawel Suski
> p...@polbox.com

> Sent via Deja.com http://www.deja.com/
> Before you buy.

Other Threads