Book a Demo

Author Topic: sql search to get the t_files entry for a class  (Read 7779 times)

GrahamL

  • EA User
  • **
  • Posts: 111
  • Karma: +2/-0
    • View Profile
sql search to get the t_files entry for a class
« on: June 17, 2021, 07:18:17 pm »
Hi
I have limited sql experience but have a need to get the access to the t_files table for a give class
I would appreciate some help in getting started

thanks

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: sql search to get the t_files entry for a class
« Reply #1 on: June 17, 2021, 09:11:29 pm »
What would you think to find in t_files? I never happend to find anything in there.

q.

GrahamL

  • EA User
  • **
  • Posts: 111
  • Karma: +2/-0
    • View Profile
Re: sql search to get the t_files entry for a class
« Reply #2 on: June 17, 2021, 09:18:23 pm »
Hi
I want to get the code generation path
I have this
Code: [Select]
       private string getGenerationPath(EA.Repository Repository, string className)
        {
            XmlDocument results = new XmlDocument();
            string sql = "SELECT File FROM t_files WHERE  name = " + className;
            string xml = Repository.SQLQuery("SELECT File FROM dbo.t_files WHERE  name = Class1");
            results.LoadXml(xml);

But when it is executed in my addin I get incorret syntax near the keyword 'File' File

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 search to get the t_files entry for a class
« Reply #3 on: June 17, 2021, 09:39:48 pm »
Code generation path is found in EA.Element.GenFile

I don't think you'll find anything useful in t_files.

Geert
« Last Edit: June 17, 2021, 09:56:14 pm by Geert Bellekens »

GrahamL

  • EA User
  • **
  • Posts: 111
  • Karma: +2/-0
    • View Profile
Re: sql search to get the t_files entry for a class
« Reply #4 on: June 17, 2021, 09:41:21 pm »
Thanks Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: sql search to get the t_files entry for a class
« Reply #5 on: June 17, 2021, 09:42:42 pm »
Well, you asked the very same question and got an answer from me and Eve. Maybe you should get some sleep first?

q.

GrahamL

  • EA User
  • **
  • Posts: 111
  • Karma: +2/-0
    • View Profile
Re: sql search to get the t_files entry for a class
« Reply #6 on: June 17, 2021, 09:46:57 pm »
Probably   :(