Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Porting DBISAM.LastAutoIncValue
Thu, Feb 4 2010 11:49 AMPermanent Link

durumdara
Hi!

I trying to port the DBISAM application. Many things are easily moved to EDB, but the old code full with:
n := xTable.LastAutoIncValue + 1

I don't know how to port this to EDB, because it have only generated identity field... Frown

In PG and FB I used generators for the new values, for example Master/Details.

But how we can do this in EDB?

Thanks:
  dd
Fri, Feb 5 2010 4:52 AMPermanent Link

durumdara
durumdara wrote:
<<<
Hi!
I trying to port the DBISAM application. Many things are easily moved to EDB, but the old code full with:
n := xTable.LastAutoIncValue + 1
I don't know how to port this to EDB, because it have only generated identity field... Frown
In PG and FB I used generators for the new values, for example Master/Details.
But how we can do this in EDB?
Thanks:
  dd
>>>

Hi!

Also interesting question that how can we handle this master-detail contact when I use only SQL?

Because I don't know what is the last inserted record (my!) only if I identify this.

In other systems we can get the generator (PG/FB) or the new autofield value to use it (like DBISAM, MySQL).

Important question that what happening, when the EDB field's generator value less than the new value we used?
Is it corrected by the system as in DBISAM, or we need to redefine it?

Temporarily until your answer I try to use select max(idfield) from table SQL, and I increase it by one.

Thanks for your help:
  dd
Fri, Feb 5 2010 6:06 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

durumdara


Search in the elevatedb.sql newsgroup for the thread DBISAM -> EDB: LASTAUTOINC

Roy Lambert
Mon, Feb 8 2010 10:20 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< I trying to port the DBISAM application. Many things are easily moved to
EDB, but the old code full with:
n := xTable.LastAutoIncValue + 1 >>

Well, first and foremost, that type of code is not particularly multi-user
safe, even for DBISAM.

<< I don't know how to port this to EDB, because it have only generated
identity field... Frown>>

Are you using an INSERT SQL statement, or just an TEDBQuery/TEDBTable
Insert/Append method call ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Feb 8 2010 10:20 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< Also interesting question that how can we handle this master-detail
contact when I use only SQL? >>

See here:

http://www.elevatesoft.com/newsgrp?action=openmsg&group=17&msg=3569&page=1

--
Tim Young
Elevate Software
www.elevatesoft.com

Image