Book a Demo

Author Topic: SQL Update in a C# addin  (Read 6525 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
SQL Update in a C# addin
« on: November 06, 2013, 06:04:52 pm »
Hi
I started writing a small C# add'in involving executing a number of SELECT SQL queries, and ending with an UPDATE SQL query.
The Update query fails so I'm wondering if EA prevents from doing this.

Update is run on the t_packages table

Thanks
Guillaume
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


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 Update in a C# addin
« Reply #1 on: November 06, 2013, 06:30:14 pm »
Guillaume,

Repository.SQLQuery only allows read-only queries.
For other types of SQL commands use Repository.Execute().

Geert

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: SQL Update in a C# addin
« Reply #2 on: November 06, 2013, 06:51:37 pm »
Thanks Geert, I'll try that.
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com