Book a Demo

Author Topic: get list of  t_connector ID from script  (Read 3929 times)

JacekSalamandra

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
get list of  t_connector ID from script
« on: June 18, 2015, 05:32:35 pm »
Hi.
Is it possible to get list of connectors via SQL and assign it to Array in JScript?
I try use
Code: [Select]
var flw = new Array();
sql="SELECT Name FROM t_connector where styleEx<>\"\"";
flw=Repository.GetElementSet(sql,2) ;
but I get DAO.Fields[3265] Item not found in this collection error.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: get list of  t_connector ID from script
« Reply #1 on: June 18, 2015, 05:43:30 pm »
GetElementSet only works to get an EA.Collection of EA.Elements.

For all other queries use Repository.SQLQuery

Geert

JacekSalamandra

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: get list of  t_connector ID from script
« Reply #2 on: June 23, 2015, 11:09:25 pm »
Thanks for your help :)