Author Topic: Database not defined  (Read 3005 times)

rfarmelo

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Database not defined
« on: September 13, 2010, 08:16:23 am »
Hi,

I'm a DB newbie and am trying to export a table in an entity relationship diagram to DDL.  I get "Database not defined." error and am able to find info necessary to fix the problem.

I have the sqlite3 odbc driver installed on my pc. I'm unclear if this is needed for this operation or if EA should be able to do this independent of any specific DB target. This is not one of the supported DBs so perhaps that's the problem.

Any suggestions?

Thanks!
« Last Edit: September 13, 2010, 08:29:17 am by rfarmelo »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13381
  • Karma: +563/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Database not defined
« Reply #1 on: September 13, 2010, 02:56:38 pm »
Quote
This is not one of the supported DBs so perhaps that's the problem.

You think ;D

So how exactly are you trying to generate DDL for a DB that is not supported?

Geert

mcottle

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Database not defined
« Reply #2 on: September 13, 2010, 03:43:11 pm »
In fairness, it's not entirely stupid to expect this to work.  If you generate plain vanilla DDL it should work with most databases supported or not and at the very least it does a lot of the typing and just needs a little bit of Search & replace massaging to make it work.

I right clicked on a table in my model did export DDL & got a nice helpful dialog giving me options which then generated a nice script.  All seemed to work fine.  I've not used SQLite, I have got an Oracle ODBC driver installed but I'm pretty sure it wasn't being used.

Now the table I generated the DDL from was reverse engineered from Oracle & on the table properties page (right click on the table & select "Properties") the Database set was Oracle so I think that could be your problem.  Select one of the database types & experiment to see which supported database is closest in syntax to SQLite.

Good Luck
Mike

rfarmelo

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Database not defined
« Reply #3 on: September 15, 2010, 05:39:02 am »
Thanks Mike...

I got help from sparxsupport via email... What I was missing was where to define a target DB. Here's the response:

This error means that the table has not had a database configured. If you wish to configure a database...
 
1. Double click on the table to invoke the properties dialog.
2. Select a database from the "Database" section.
3. "OK".
 
To configure a default database...
 
1. "Tools | Options".
2. Within the "Options" dialog select Source Code Engineering > Code Editors from the tree hierarchy.
3. Select the appropriate database from the "Default Database" section.