Author Topic: Error "-2147217900" after transferring file based Project to MySQL  (Read 9419 times)

fp123

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
After transferring our project to MySql DB I receive the following error when clicking on any object in any diagram:

"Microsoft OLE DB Provider for ODBC Drivers [-2147217900]

[MySQL][ODBC 5.3(w) Driver][mysqld-5.0.45-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Precision, Scale,
Const, Style, Classifier, Default, Type, StyleEx
FROM t_attr' at line 3

Context:
SELECT
Name, Scope, Stereotype, Containment, IsStatic, IsCollection, IsOrdered, AllowDuplicates,
LowerBound, UpperBound, Container, Notes, Derived, ID, GenOption, Length, Precision, Scale,
Const, Style, Classifier, Default, Type, StyleEx
FROM t_attribute
WHERE t_attribute.Object_ID = 20243"

I searched the DB for this Item but in the table "t_attributes" there's no object_id 20243.

Before transferring the model to the DB, I started the Project integrity check with "recover/clean" option checked.
I also ran the sql script "EASchema_851_MySQL_InnoDB.sql" on the DB.

After that I used "Project Transfer File to DBMS" to transfer the model to the DB with no errors.

Can anyone give advice on how to fix the error?

fp123

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Error "-2147217900" after transferring file based Project to MySQL
« Reply #1 on: July 08, 2016, 06:29:43 pm »
I've also tried a newer version of MySQL (5.6.11) an the newer script "EASchema_Alter851to1220_MySQL.sql" with the same effect. The I tried to load a smaller Project to the same database. In this case the errors don't seem to happen.

Now I think, this should be an Error in the project file, not in the database.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Error "-2147217900" after transferring file based Project to MySQL
« Reply #2 on: July 08, 2016, 07:05:15 pm »
Check EA's documentation, which versions of the MySQL ODBC is supported. I remember some limitations.

q.

fp123

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Error "-2147217900" after transferring file based Project to MySQL
« Reply #3 on: July 08, 2016, 10:57:18 pm »
I've already tried v5.3.6, v5.2.4, v5.1.13 and 5.1.6 all with the same result. The one recommended by Sparx (5.1.5) is only available as source code from MySQL.

fp123

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Error "-2147217900" after transferring file based Project to MySQL
« Reply #4 on: July 08, 2016, 11:01:26 pm »
The error always happens if I klick on an object like a component, interface in a diagram. Not on connectors or something in the Project Browser.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Error "-2147217900" after transferring file based Project to MySQL
« Reply #5 on: July 08, 2016, 11:10:08 pm »
Just poking in the fog: can you try to execute the above SQL in the scratchpad of EA?

q.

fp123

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Error "-2147217900" after transferring file based Project to MySQL
« Reply #6 on: July 08, 2016, 11:34:40 pm »
Executed in MySQL Workbench I get exactlx the same error message like in EA.

fp123

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Error "-2147217900" after transferring file based Project to MySQL
« Reply #7 on: July 08, 2016, 11:37:36 pm »
Same for the scratchpad in EA.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Error "-2147217900" after transferring file based Project to MySQL
« Reply #8 on: July 09, 2016, 01:08:58 am »
Maybe Type, Const or another one is  a reserved word and needs to be quoted. In any case you should contact Sparx support via mail.

q.

P.S. For EAP the SQL works. It highlights Precision and Default, though.
« Last Edit: July 09, 2016, 01:10:53 am by qwerty »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Error "-2147217900" after transferring file based Project to MySQL
« Reply #9 on: July 09, 2016, 01:41:44 am »
Have you remembered to set the options int he odbc driver?

(from memory)
- allow large result sets
- returned number of rows instead of matched rows

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Error "-2147217900" after transferring file based Project to MySQL
« Reply #10 on: July 09, 2016, 02:21:07 am »
My next guess is, that your server rather than the ODBC version is not supported.

q.

fp123

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Error "-2147217900" after transferring file based Project to MySQL
« Reply #11 on: July 11, 2016, 06:33:18 pm »
Thanks for your help guys.

I've set the options in the ODBC connector and also tried multiple versions of the connector ( v5.3.6, v5.2.4, v5.1.13 and 5.1.6) and MySQL database (5.0.45 and 5.6.11).
Sparx recommends ODBC driver v5.1.5, but this one is only available as source code from MySQL.

Support was contacted but needs much time to answer.

fp123

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Error "-2147217900" after transferring file based Project to MySQL
« Reply #12 on: August 09, 2016, 11:11:23 pm »
Hi,

I just want to provide some feedback about the Solution of this Problem.
The failure was not caused by EA itself, but by one of our PlugIns, that had not been modified for using a DB based EA-project.