Book a Demo

Author Topic: Alternate images  (Read 3747 times)

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Alternate images
« on: January 16, 2007, 07:32:06 am »
How to import lots of alternate images at once? (I have gif not in Image library.)
Thanks.
Jan 'Bary' Glas

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Re: Alternate images
« Reply #1 on: January 16, 2007, 01:17:19 pm »
Not that I know of in EA.  However, (assuming you are using an MS SQL Server back end and depending on how many images you need to load) - you might be able to write a SQL script to do a BULK INSERT from image files.  See http://support.microsoft.com/kb/197043 for an example.

DAvid.
« Last Edit: January 16, 2007, 01:17:54 pm by Dave_Bullet »
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Alternate images
« Reply #2 on: January 17, 2007, 01:17:38 am »
Thank you, Dave,
I am not db person. I only know how to use EA ;-) and have a SQL repository somewhere. Is it possible to do this from inside the EA? (Not mentioning that I cannot write the proper code.)

Anyone can help?
Jan 'Bary' Glas

thomaskilian

  • Guest
Re: Alternate images
« Reply #3 on: January 17, 2007, 01:24:13 am »
Hi Jan,
you can't do that from inside EA (only simple queries). Depending on the DB you need something like TOAD or for MS SQL the management console. I have not looked into EA where and how alternate images are stored. I might have half an hour later to do that (if not someone else has a solution already).

Edit:Apparently you have to import the images into table t_image. Each image has an ID (sequence number starting from 1), a name, a type (String "Bitmap" etc.) and the Blob. The elements in t_diagramobjects refer to the images by including the string "ImageID=<id>;" in the column objectStyle, where <id> is the number from t_image.

Now for the Bulk insert: This depends on the SQL Server you have. Once I had SQL Server 2000 and I knew where to perform that. But now I only have 2003 (the freeware version) which I did not install to full extend. You might find the right trace using Google.
« Last Edit: January 17, 2007, 02:55:26 am by thomaskilian »