Book a Demo

Author Topic: SQL Query : Update t_object?  (Read 4321 times)

M3SYSTEMS

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
SQL Query : Update t_object?
« on: May 08, 2013, 02:28:49 am »
Hi all,

I'd like to update the "tagged" column (=Bookmark) of the table t_object according conditions (WHERE) by using a SQL Query.

For example:
UPDATE t_object SET tagged=1 WHERE EA_GUID=xxx

Is-it possible?
I didn't find any solution.  :-?
The only SQL QUERY proposed by EA seems to be a "SELECT" one.

Thanks in advance

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: SQL Query : Update t_object?
« Reply #1 on: May 08, 2013, 02:44:20 am »
Use Repository.Execute (SQL). Works. Totally undocumented. Totally unsupported. But - works.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: SQL Query : Update t_object?
« Reply #2 on: May 08, 2013, 02:46:01 am »
Repository.SQLQuery() can only be used for select queries.
For update queries you'll need to use Repository.Execute() (undocumented, and unsupported feature)

Geert

M3SYSTEMS

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: SQL Query : Update t_object?
« Reply #3 on: May 15, 2013, 06:48:49 pm »
Thanks a lot!  :)

Olivier