Book a Demo

Author Topic: Error about the ODBC connection in EA  (Read 7366 times)

geniousxu

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Error about the ODBC connection in EA
« on: November 29, 2007, 11:07:46 pm »
  Hi, I used the EA ver 7.0 and connected the Project to Server. I selected the "Microsoft OLE DB Provider for ODBC Drivers" and the testing connection succeed. But when I input the project name and clicked the "OK", the program jumped out an error message with "Enterprise Architect has exprienced a network error and will close down". What's wrong?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Error about the ODBC connection in EA
« Reply #1 on: November 30, 2007, 05:28:36 am »
I'm guessing that you've created the target repository with the appropriate SQL script from Sparx, and are now trying to open it as a project. Suddenly you get an error.

Here's some things to check, in no particular order.

Have you got the best provider for your DBMS? In the case of Oracle or SQL Server (for example) there are OLE DB drivers specifically for these products. You should use them instead of the generic driver. I suspect that this is the case for most if not all the supported DBMS products.

If you use Oracle, consider installing the most recent client you can find, even if it is from a later database version than you normally use. Oracle maintains excellent downward compatibility in their client software, and some EA users have mentioned problems with (not very much) older versions of the Oracle client.

Make sure you have done a project transfer before you open your new repository. The SQL scripts only set up the schema, they do not load the necessary 'seed' data for EA to recognize as a project. You first need to load this from some other project. This could be a project started as an EAP file, or an empty project (perhaps configured to your corporate standards) stored in an EAP file or in your DBMS, and kept ready for just this purpose.

You can do the transfer from the EA main menu - you don't need to open a project first, just start EA - by choosing Tools | Data Management | Project Transfer. Please note that the target project will be overwritten. In the case of a newly-created repository this is fine, but make sure you don't try using this function to do any kind of incremental transfer; there are other functions to accomplish that.

Please let us know if any of this gets you going.

David
No, you can't have it!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Error about the ODBC connection in EA
« Reply #2 on: November 30, 2007, 05:35:58 am »
I just got to thinking... [This happens rarely enough that it is worth writing about.]

If you are trying to connect through automation, then you could be having another problem. The connection string you need to pass must be slightly altered. EA needs a prefix, consisting of the project name, a space, three dashes, and another space. This is put in front of the normal OLE DB connection string, and the resulting string is passed as a parameter to the Repository.OpenFile method.

You used to be able to see the correct prefix, and an acceptable connection string, by opening EA and then clicking File in the main menu. EA would show the prefix on a DBMS project in the recently opened list. For now, you can open a DBMS project via the UI, then attempt to save it to a new EAP file (via File | Save As). [I think I've got this right.] EA will create an EAP file containing only the connection string, which you can paste into your project. You can also open the DBMS project by double-clicking the file. Nifty!

David
No, you can't have it!

geniousxu

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Error about the ODBC connection in EA
« Reply #3 on: December 03, 2007, 01:11:04 am »
Hi, thank you for your reply. However, the problem still existed and I still didn't find out the solution.

So here I would like to show you some details about our project, and would you like to consider it and give me a reply?

Our DB Server is Solaris, and the DB is POSTGRE Ver 8.1.4, the Driver of ODBC is psqlodbc-08_02_0500. In my opinion I don't think there is any problem, because another project based on such configuration in our company runs successful. I really have no idea about it. :'(

Waiting for your reply.




«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Error about the ODBC connection in EA
« Reply #4 on: December 03, 2007, 06:23:39 am »
How are you connecting, through the API or via the UI (that is, on a desktop session)?
No, you can't have it!

geniousxu

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Error about the ODBC connection in EA
« Reply #5 on: December 04, 2007, 01:51:35 am »
Well, we connect the server by UI.

I know that it's hard to solute my problem, however, I hope you consider that what the problem may be based on your experiences. Thank you.

PS: Unfortunately, my working time is your sleeping time. :-[

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Error about the ODBC connection in EA
« Reply #6 on: December 04, 2007, 05:35:24 am »
Quote
...
Our DB Server is Solaris, and the DB is POSTGRE Ver 8.1.4, the Driver of ODBC is psqlodbc-08_02_0500. In my opinion I don't think there is any problem, because another project based on such configuration in our company runs successful...

Since I don't use either component, I'll have to guess a bit here.

When you mention "another project" are you talking about another EA project that successfully connects, or just that you've been able to use this driver-DBMS combination for other work?

In the latter case, check the current EA help for specific supported versions of both the driver and the DBMS. Also, make absolutely sure that you've used the most recent SQL script from Sparx to build your repository - I've recently been tripped up by not doing so.

[NB: The current on-line help is out of date (by a build or so), but that should be corrected very soon. The full install download has the most current version of the help file. I doubt that the versions have changed in the past few builds though.]

David
No, you can't have it!