Author Topic: Changing Datatype in diagram model  (Read 2961 times)

jsnv

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Changing Datatype in diagram model
« on: March 21, 2006, 07:12:44 pm »
hi, can anyone tell me how to change datatype in diagram model automatically and affect all diagrams ?

eg. change datatype varchar(xx) into nvarchar(xx)

thx

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8063
  • Karma: +118/-20
    • View Profile
Re: Changing Datatype in diagram model
« Reply #1 on: March 21, 2006, 08:28:25 pm »
I'm assuming you're wanting to change all attributes (or columns) with the type varchar to type nvarchar, not just one attribute as it is shown on multiple diagrams.

The best I can suggest would be a SQL call on your EA model.

Something like: update t_attribute set Type='nvarchar' where Type='varchar' should do the job.

jsnv

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Changing Datatype in diagram model
« Reply #2 on: March 21, 2006, 08:35:07 pm »
sory i'm new to EA, where do i input statement "update t_attribute set Type='nvarchar' where Type='varchar' in EA?

is it  i must generate ddl script first?

thx

thomaskilian

  • Guest
Re: Changing Datatype in diagram model
« Reply #3 on: March 22, 2006, 02:18:25 am »
The EAP files are MS Access databases. You can execute above SQL on that using MS Access.

Alternatively try the following (this is a hack which might not work :o)
- Ctrl-F to open the Search window
- Advanced
- New Search
- name it Update or Dummy or whatever
- check SQL Editor
- OK
- Paste the query in the new window
- Save
- Run Search

The last action will execute the SQL. You should delete the "Search" filter afterwards - since it's a hack, not a search!

jsnv

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Changing Datatype in diagram model
« Reply #4 on: March 22, 2006, 07:57:38 pm »
WOW it works  :D
i'm using ms access to do it

thx all

roman

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • good luck ;-)
    • View Profile
Re: Changing Datatype in diagram model
« Reply #5 on: March 23, 2006, 03:35:00 am »
Quote
The EAP files are MS Access databases.


Thank you Thomas, this tells everything.

I'll suggest a next, may be more safe way:

  • Create a blank mdb-database
  • \Tables\Link, link all tables from eap-project. There is no
    file-extension problem. Access can read mdb-file with eap file-extension.
  • Build in this new mdb-file you filters, queries, ...


This way you access only the data in eap-file, much more, you can build your eap-model-administration mdb-file.
Just change eap data source.
8) But! Backup eap-file, 2x think about the change step, then do it, of course!

Thank you for this tip. ;-)

Roman