Link to home
Start Free TrialLog in
Avatar of CodeGear2007
CodeGear2007

asked on

Unsupported feature

Hi

I'm using D2009

when i use this code:

IBTable1.Locate('Name',Edit1.Text,[loPartialKey]);

 this message appears:

(Project Project1.exe raised exception EIBClientError with message 'Unsupported feature'.)

 
i really need the solution of this problem

Thanks
Avatar of rfwoolf
rfwoolf
Flag of South Africa image

I'm pretty sure delphi has a help file article on IBTable's methods. Check the syntax for the locate method -- you're probably doing something wrong with the [loPartialKey] or something. If it's doing this error at runtime, make sure that your Name field is indexed. What database are you using.
Avatar of CodeGear2007
CodeGear2007

ASKER

i'm using Interbase and D2009

and it's work with D2007 and Firebird
Avatar of Geert G
what about not using the loPartialKey ?

is name a primary key field ?
I tried to use [loPartialKey] and [loCaseInsensitive] and i even tried not using them

i also tried the name as primary key field and no priamry in both cases it didn't work
ASKER CERTIFIED SOLUTION
Avatar of CodeGear2007
CodeGear2007

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
isn't that a typo ?

lloCaseInsensitive

the dubbel l ?
Umm.. I told you to check the help file which gives you the syntax (varrayof) which would have solved your problem. Although I probably don't deserve an A-grade answer, my answer was nonetheless correct :)
next to that, vararrayof([edit.text]) and edit.text will result in the same thing
All right I looked up
TIBTable.Locate method in my delphi help, it gives the syntax:
[Delphi] function Locate(const KeyFields: string; var KeyValues: Variant; Options: TLocateOptions): Boolean; override;
and this example:
Locate('Company;Contact;Phone', VarArrayOf(['Sight Diver', 'P', '408-431-1000']), [loPartialKey]);
I concede that your version might not have this example or that it didn't tell you to use VarArayOf.
You may award yourself points as you like because I was not very helpful.