Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread how do i update a record if theres no unique field
Sat, Sep 28 2013 11:15 AMPermanent Link

Aaron Taylor

Avatar

Is there a way to identify the record to change if it does not have a unique field.
I see theres mention of RecordID but i cant seem to access it.
Sat, Sep 28 2013 12:01 PMPermanent Link

Raul

Team Elevate Team Elevate

In DBISAM 4.x then there is a system field called RecordID - you'd need
to actually specify it for it to show up (i.e. "select RecordID,* from
mytable" for example instead of "select * from mytable").

Raul


On 9/28/2013 11:15 AM, Aaron Taylor wrote:
> Is there a way to identify the record to change if it does not have a unique field.
> I see theres mention of RecordID but i cant seem to access it.
>
Sat, Sep 28 2013 12:22 PMPermanent Link

Aaron Taylor

Avatar

Thanks Raul, ill give that a go.
Sat, Sep 28 2013 12:49 PMPermanent Link

Aaron Taylor

Avatar

That works well if you do a query, is there a way to get the RecordID if your using a TDBISAMTable.

Im displaying the data by TDBISAMTable and then updating the record via TDBISAMQuery.
Sun, Sep 29 2013 10:44 PMPermanent Link

Jeff Cook

Aspect Systems Ltd

Avatar

Have you tried    .FieldByName('RecordID').AsInteger;

--
Jeff Cook
Aspect Systems Ltd
www.aspect.co.nz

<Aaron Taylor> wrote in message
news:105B05EB-5F39-4E47-B61A-453B3966FAEA@news.elevatesoft.com...
> That works well if you do a query, is there a way to get the RecordID if
> your using a TDBISAMTable.
>
> Im displaying the data by TDBISAMTable and then updating the record via
> TDBISAMQuery.
>

Mon, Sep 30 2013 3:52 AMPermanent Link

Aaron Taylor

Avatar

it returns error - field not found.
Mon, Sep 30 2013 1:10 PMPermanent Link

Raul

Team Elevate Team Elevate


It's not exposed as part of the dataset fields but you can access it by
using DBISAMTable.RecordID field for the current record.

if you can switch to query instead of table then you can just include it
as part of the field list on select.


Raul


On 9/28/2013 12:49 PM, Aaron Taylor wrote:
> That works well if you do a query, is there a way to get the RecordID if your using a TDBISAMTable.
>
> Im displaying the data by TDBISAMTable and then updating the record via TDBISAMQuery.
>
Mon, Sep 30 2013 3:17 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Aaron,

<< Is there a way to identify the record to change if it does not have a
unique field. I see theres mention of RecordID but i cant seem to access it.
>>

You can use the system-maintained RecordID to identify records, but the
problem is that unless you have an index on the RecordID field, you won't be
able to quickly or efficiently locate records using it.

So, you'll want to, at the very least, define an index on RecordID and then
you can use FindKey, etc. to search on it.

Tim Young
Elevate Software
www.elevatesoft.com
Image