Book a Demo

Author Topic: DAO.Recordset [3022]  (Read 13470 times)

Fundação Gorceix

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
DAO.Recordset [3022]
« on: March 14, 2012, 05:14:34 am »
When trying to create a glossary in Enterprise Architect via xml import is experiencing an error due to duplicate name.

The Enterprise Architect sees the term as the primary key and therefore returns me the message below:

DAO.Recordset [3022]

The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship.  Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.

At the end of the error message tells you to "redefine the index to permit duplicate entries," but I can not find where you redefine this index.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: DAO.Recordset [3022]
« Reply #1 on: March 14, 2012, 08:56:47 am »
The error you are seeing is coming directly from the database. Fortunately, I've seen this issue reported not long ago. A translation in this context would be:
"One of the glossary terms you are attempting to import already exists in this model with a different type."

A workaround until this is fixed would be to glossary entries from the target database.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: DAO.Recordset [3022]
« Reply #2 on: March 14, 2012, 09:29:40 am »
Quote
.. would be to [highlight]delete the [/highlight] glossary entries from the target database...
Or export the glossary and find the duplicate entry by name deleting/merging only this one.

q.

Fundação Gorceix

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: DAO.Recordset [3022]
« Reply #3 on: March 14, 2012, 10:37:54 pm »
The problem is that we need to have in the database, the same terms with different types. And put the same terms that appears this error message. Is there any way to accept duplicate terms in the database? Leveraging the solution given by Simon M, as this would be direct access to the database of destination?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: DAO.Recordset [3022]
« Reply #4 on: March 14, 2012, 11:30:00 pm »
Try tweaking the primary key settings in the t_glossary table. EA might encounter problems in editing these as it might be possible that they perform UPDATE/DELETE FROM t_glossary WHERE Name=<name> instead of WHERE GlossaryID=<id> since they assume Name to be unique. You should try that in a sandbox first.

q.
« Last Edit: March 14, 2012, 11:33:00 pm by qwerty »

Fundação Gorceix

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: DAO.Recordset [3022]
« Reply #5 on: March 15, 2012, 12:01:04 am »
Qwerty, this is precisely what we do. However, we do not know how to change the configuration of the primary key in table t_glossary. This should be done in the EA or the database?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: DAO.Recordset [3022]
« Reply #6 on: March 15, 2012, 04:56:25 am »
Yes. Depends on the type of repository you will need the appropriate SQL client to perform these changes. For EAP its MS Access for any other use TOAD or whatever your DB comes along.

q.

Fundação Gorceix

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: DAO.Recordset [3022]
« Reply #7 on: March 15, 2012, 10:23:19 pm »
Ok where do I find the file of the database?
« Last Edit: March 15, 2012, 10:25:47 pm by FGorceix »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: DAO.Recordset [3022]
« Reply #8 on: March 16, 2012, 12:08:46 am »
If you unveil a secret and tell me what kind of DB you use...

q.

Fundação Gorceix

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: DAO.Recordset [3022]
« Reply #9 on: March 16, 2012, 01:19:26 am »
I use MS Access.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: DAO.Recordset [3022]
« Reply #10 on: March 16, 2012, 06:07:53 am »
Okay. Then just launch MS Access (I guess most people have that MS Office Suite - I don't) and open the EAP file. That's it. I'm not too familiar with what MS Access can actually do (it's about 10 years I seriously worked with it). But there's likely a way to inspect and change indexes/key constraints to fit your needs.

q.
« Last Edit: March 16, 2012, 06:08:46 am by qwerty »

Fundação Gorceix

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: DAO.Recordset [3022]
« Reply #11 on: March 16, 2012, 10:56:27 pm »
Qwerty I opened the file of the EA in the MS Access, but after that I altered the t_glossary table and I saved the file, it just gives me the option to save in the accdb extension, and I need save in the eap extent to open again in the EA. I use MS Access 2010.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: DAO.Recordset [3022]
« Reply #12 on: March 16, 2012, 11:47:46 pm »
Go ahead and rename the saved file to .EAP

q.

Fundação Gorceix

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: DAO.Recordset [3022]
« Reply #13 on: March 17, 2012, 12:41:13 am »
I already tried that option, but when I open the file with the EA appears the error "An error has Ocurred: Unrecognized database format".

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: DAO.Recordset [3022]
« Reply #14 on: March 17, 2012, 01:51:54 am »
Well then. It seems the new MS stuff is incompatible with the old one. Maybe - maybe! - you can try setting Tools/Options/Use Jet 4.0 in EA. I just recognize that in the meantime they changed that to be default. If that does not work you're lost except you find a way to save the database in an old format.

Or you switch to some *real* database.

q.

P.S. This is what google said: http://office.microsoft.com/en-us/access-help/save-an-access-2010-database-in-an-earlier-file-format-HA010341553.aspx
« Last Edit: March 17, 2012, 04:10:11 am by qwerty »