Author Topic: Model Searches  (Read 2302 times)

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Model Searches
« on: March 12, 2010, 10:42:44 pm »
Hi All
I have a search defined in EA as
Code: [Select]
SELECT Supplier FROM t_xref WHERE t_xref.Name='Element' AND t_xref.Type='reference' AND t_xref.Client='<Search Term>'
This returns the results I want.
Now I want to call this search from my addin code so I put
Code: [Select]
                   EA.Collection references = Repository.GetElementsByQuery("xxxxxx", CurrentlySelectedElement.ElementGUID);
when this runs I get a dialog stating I must include eaguid as CLASSGUID
in the sql statement.
If I include this I get an error dialog stating that there are 'too few parameters - expected 1'
Why is this the case?
Confused
Graham
Using V12

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Model Searches
« Reply #1 on: March 15, 2010, 08:53:46 am »
Try ea_guid...

Code: [Select]
SELECT Supplier, ea_guid as CLASSGUID FROM t_xref WHERE t_xref.Name='Element' AND t_xref.Type='reference' AND t_xref.Client='<Search Term>'
The Sparx Team
[email protected]