Author Topic: Custom tables in EA  (Read 3299 times)

Karan Mundhra

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Custom tables in EA
« on: July 26, 2021, 07:31:46 pm »
Hi,

I am using the custom tables in EA. Attached screen shot.

The column width for the tables can be changed by the user. It is stored in EA.

The question is where is this information regarding the column width getting stored. I am unable to find it any of the sql tables

Thanks,
Karan

qwerty

  • EA Guru
  • *****
  • Posts: 12446
  • Karma: +348/-291
  • I'm no guru at all
    • View Profile
Re: Custom tables in EA
« Reply #1 on: July 26, 2021, 10:33:16 pm »
There is no screen shot attached. Column width is held in the database. Depends which you are using there are native tools to retrive the database structure. Or even EA can be used to RE a DB.

q.

Karan Mundhra

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Custom tables in EA
« Reply #2 on: July 26, 2021, 11:06:51 pm »
Can you let me know which sql table I can find the column width?
Using EAP file / MYSQL hosted DB.

philchudley

  • EA User
  • **
  • Posts: 669
  • Karma: +16/-0
  • UML/EA Principal Consultant / Trainer
    • View Profile
Re: Custom tables in EA
« Reply #3 on: July 27, 2021, 12:49:27 am »
From my experiments the column width, row width etc is stored in XML within the tagged value named dataFormat.

Tagged values are stored in the database table t_objectproperties


Here is an example of the that tagged value XML

<?xml version="1.0"?>
<dataformat>
   <style>
      <grid rows="4" columns="3"/>
      <cells/>
      <rows/>
   </style>
   <layout autosizecolumns="1" version="1" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64">AwABAAAAAQAAAAEAAAADAC4BAABmAQAAAgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAA==</layout>
</dataformat>


The actual value of the column width appears to be buried in the "bin.base64" field. This has been confirmed by changing the column width and value of this field changes.

Best of luck extracting the actual value!

Phil
follow me on Twitter

@SparxEAGuru

qwerty

  • EA Guru
  • *****
  • Posts: 12446
  • Karma: +348/-291
  • I'm no guru at all
    • View Profile
Re: Custom tables in EA
« Reply #4 on: July 27, 2021, 01:54:27 am »
Well, that's not it, Phil. That table holds the tagged values and that's in no way related to width of any table column.

q.

philchudley

  • EA User
  • **
  • Posts: 669
  • Karma: +16/-0
  • UML/EA Principal Consultant / Trainer
    • View Profile
Re: Custom tables in EA
« Reply #5 on: July 27, 2021, 02:26:48 am »
Absolutely true the width of a custom table is not held in t_objectproperties.

Let me clarify what I was trying to say.

A Custom Table element has two tagged values named data and dataFormat, both of these are most definitely stored in t_objectproperties.

Both these tagged values are of type <memo> hence their value is stored in their Notes properties therefore in t_objectproperties.Notes

The tagged value of interest is dataFormat and its Notes properties are represented in XML as per my post. Inside this XML is a field named <layout> with bin.base64 value in which is the value of the custom table column widths.

So the column width is stored in the t_objectproperties.Notes field of the t_objectproprties table where t_objectproperties.Property is equal to 'dataFormat'

I have confirmed this with a simple SQL Query.

Phil
follow me on Twitter

@SparxEAGuru

qwerty

  • EA Guru
  • *****
  • Posts: 12446
  • Karma: +348/-291
  • I'm no guru at all
    • View Profile
Re: Custom tables in EA
« Reply #6 on: July 27, 2021, 05:11:25 am »
Ah, now I see. Custom Table has to do with database modeling in EA, not with EA's tables. There is the link... So I'm out here ;-)

q.
« Last Edit: July 27, 2021, 06:23:59 pm by qwerty »

Karan Mundhra

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Custom tables in EA
« Reply #7 on: July 27, 2021, 01:08:12 pm »
Thanks. Let me figure out how to decode the data. :)