Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 13 of 13 total
Thread Do I need a Index If I have a constraint?
Fri, Feb 21 2020 2:24 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

KimHJ

>If i have a index with the Field MyID and call the index CustomerID, then in my Delphi code I can not use IndexByName := 'MyID'; ?

I'm using D2007 and EDB 2.31b12 and I don't have IndexByName, I have IndexName.

If you want to refer to the field(s) that comprise an index you need to use IndexFieldNames

>Maybe that is why I get Access violation sometimes?

Unlikely. That's down to trying to access some object that hasn't been created or has been freed.

Roy
Fri, Feb 21 2020 1:43 PMPermanent Link

KimHJ

Comca Systems, Inc

Roy Lambert wrote:

>>If i have a index with the Field MyID and call the index CustomerID, then in my Delphi code I can not use IndexByName := 'MyID'; ?

I'm using D2007 and EDB 2.31b12 and I don't have IndexByName, I have IndexName.

If you want to refer to the field(s) that comprise an index you need to use IndexFieldNames

>>Maybe that is why I get Access violation sometimes?

Unlikely. That's down to trying to access some object that hasn't been created or has been freed.

<<

I meant IndexFieldNames := 'MyID'; Sorry.

It looks like I have to create a index with the MyID even it's also added as a Constraint.


Kim
Sat, Feb 22 2020 2:10 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

KimHJ


In the IDE if you click on the dropdown against IndexFieldNames and IndexName what values do you get?

Roy Lambert
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image