Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Generated Field Type in EDBQuery
Fri, Aug 19 2016 8:52 AMPermanent Link

Charalampos Michael

Hello,
 I have a Generated Field which on EDBTable FieldDefs show as AutoInc.

 On EDBQuery show as Integer with RequestSensitive = False with either closed or opened dataset.
 On EDBQuery show as AutoInc with RequestSensitive = True and dataset opened only !!!
 
 Shouldn't EDBQuery treat this as AutoInc field in any case ?

Thank you
Fri, Aug 19 2016 10:06 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Michael,

<<  On EDBQuery show as Integer with RequestSensitive = False with either closed or opened dataset.
 On EDBQuery show as AutoInc with RequestSensitive = True and dataset opened only !!!
 
 Shouldn't EDBQuery treat this as AutoInc field in any case ? >>

It's just the nature of how insensitive result sets work - they are a static copy of the rows from the query result set, and as such, they are subject to different rules than *live* access to the underlying table.

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Aug 19 2016 10:33 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Charalampos Michael wrote on Fri, 19 Aug 2016 08:52:45 -0400

>Hello,
> I have a Generated Field which on EDBTable FieldDefs show as AutoInc.
>
> On EDBQuery show as Integer with RequestSensitive = False with either closed or opened dataset.
> On EDBQuery show as AutoInc with RequestSensitive = True and dataset opened only !!!
>
> Shouldn't EDBQuery treat this as AutoInc field in any case ?

That raises a number of points.

First is that ElevateDB doesn't have the Autoinc type and what you're seeing is Delphi's translation (or possibly how ElevateDB reports to Delphi - I don't know). The difference is then caused by the fact that with a sensitive result set the field can be edited (unless its set to generate always I think - haven't tested) but with an insensitive result set it can't be edited, can't increment because rows can't be added, so its just showing as an integer.

I have persistent fields set up and those have translated "correctly" as TAutoIncField

I'm sure Tim can explain better but that's my take on it.

Roy Lambert
Image