in

The ORM Foundation

Get the facts!

The specified invariant name is not supported

Last post Mon, Jun 22 2015 6:40 by Ken Evans. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • Tue, Dec 18 2007 9:10

    • milkmen
    • Top 500 Contributor
    • Joined on Sat, Mar 8 2008
    • Posts 1

    The specified invariant name is not supported

    Hi,
    
    I want to reengineer an existing database-schema using ORM. 
    I used Import DB (File->New Item->Object-Role Modeling (DB Import).
    
    After specifying and testing the connection I get the following error message: 
    The specified invariant name is not supported.
    
    Is there a solution to solve this? 
    I tried different data sources and connections are working.
    
    I’m using Neumont ORM Architect for Visual Studio 2007-11CTP.
    
    Joris
    
    
    
  • Thu, Jan 24 2008 19:02 In reply to

    RE: The specified invariant name is not supported

    Jeez, lousy error message. Sorry.
    
    We currently support two DataProvider names:
    
    System.Data.SqlClient
    and
    MySql.Data.MySqlClient
    
    Other connection types are not currently supported.
    
    Please feel free to code providers for other connection types:) The Tools\DatabaseImport project is the place to add them, with the provide mappings in the DcilObjectModel.cs file (GetDcilSchemaProvider method). Obviously, we would like to extend the set of support targets.
    
    A couple of known limitations:
    1) Spaces in the DB schema/table/column names end up as spaces in intermediate XML file identifier attributes, which is not allowed. We'll fix this one.
    2) Import from more than one SQL owner is not currently supported. The is significant work to be done in this area to support this across the board.
    
    You will also see better ORM coming in from the export as time goes on. We added basic join tables in December, more pattern recognition will follow (but probably not this quarter).
    
    -Matt
    
  • Mon, Jan 13 2014 16:28 In reply to

    Re: RE: The specified invariant name is not supported

    Hi Matt,

    I get this message with Oracle (ODP.NET). By the way, did you add support for any other data provider?

     José 

  • Thu, Jan 16 2014 18:04 In reply to

    Re: RE: The specified invariant name is not supported

    Sorry,  José, I haven't done any work in this area.

    This comes down to writing a file for Oracle that is similar to http://sourceforge.net/p/orm/code/HEAD/tree/trunk/Tools/DatabaseImport/SqlServer2005DcilSchemaProvider.cs and plugging it into the GetDcilSchemaProvider method in DcilObjectModel.cs in the same directory.

    I actually started this process for Postgres last year, but I blew my development time just finding a provider that would hook up cleanly to VS and get me a viable DB connection. I didn't even get to the code.

    If you're using an Oracle system with VS, maybe you can give me some links to the bits I need to install to get there myself. I need to be able to open a Data Connection in the Server Explorer window as this uses the same facilities to connect as the database import. I'd also welcome any tips on the queries needed to extract the schema information from a db (I'm using the normal meaning of schema, not the weird Oracle user account meaning of the term).

    -Matt

    PS Free versions are good. I don't have the cash to drop on this for the privilege of writing code for a couple of days.

  • Mon, Jan 20 2014 10:37 In reply to

    Re: RE: The specified invariant name is not supported

    Hi Matt,

    I worked on this during the weekend and I think I got a working version for Oracle. I tested it with these providers:

    - OracleClient from Microsoft (System.Data.OracleClient), and

    - ODP.NET from Oracle (Oracle.DataAccess.Client), this provider comes with the ODAC set of libraries developed by Oracle. I used the 32-bit version which you can download from this page:

    http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html

    I made some tests and they all worked well, I could import an Oracle schema and generate the orm file. I am sending you this file along with the modified source files. I'm not sure if the data type mappings are 100% correct, I just tried some of them.

    This was my development configuration, just in case:

    - Windows 7, 64 bits.

    - Visual Studio 2010, professional ed.

    - ODAC 11.2 Release 4 (11.2.0.3.0).

    - Oracle database 9i 

    I think the code could work without modifications with ODP.NET 11.2.0.3.20 as well. With version 12, maybe it's necessary to add a new name to reference the provider considering that the namespace has changed to something like Oracle.ManagedDataAccess.Client. 

    Jose 

  • Fri, Apr 18 2014 0:25 In reply to

    • koneill
    • Top 25 Contributor
      Male
    • Joined on Fri, Feb 17 2012
    • The Netherlands
    • Posts 38

    Re: RE: The specified invariant name is not supported

     Hi Guys,

    Any progress in this area Smile? Just asking because I was planning on reverse engineering an oracle schema using VS2012 and ODAC 12c Release 2 (12.1.0.1.2) but I got the mentioned "invariant is not supported" message.

     Regards,

    Karl

     

  • Fri, Apr 18 2014 17:41 In reply to

    Re: RE: The specified invariant name is not supported

    Hi Karl,

    I've checked in the code provided in this thread by Jose Carlus (whom I owe a huge belated thank you). I have not tested this, and I think you're running a different driver version, but it is definitely worth a try.

    The database import assembly needs to be installed in the GAC or VS won't open it, so updating isn't a simply file copy. The easiest way is to just rerun setup. I've started posting the latest intermediate builds (including 1544 with this change) at http://ORMSolutions.com/NORMAPreview.

    -Matt

    PS Any PostgreSQL experts out there who want to tackle this?

  • Sun, Apr 20 2014 21:16 In reply to

    Re: RE: The specified invariant name is not supported

    Don't worry Matt, I was very happy to work on this.

    Well, I installed the build for VS2010 and I could import an entire Oracle schema using the following providers:

    - System.Data.OracleClient from Microsoft

    - ODP.NET version 12 from Oracle (Oracle.DataAccess.Client, the unmanaged version)

    It's not working with the managed versión of ODP.NET as I expected because I didn't consider it in the code that I uploaded.

    It would be useful to hear if it works with other versions of the ODP.NET provider as well.

    Jose 

  • Mon, Apr 21 2014 23:48 In reply to

    • koneill
    • Top 25 Contributor
      Male
    • Joined on Fri, Feb 17 2012
    • The Netherlands
    • Posts 38

    Re: RE: The specified invariant name is not supported

    Just tried it with VS2012 and ODAC 12c Release 2 (12.1.0.1.2) and it works with the unmanaged ODP.NET driver Big Smile

    Thanks guys!! saves me alot of work!

  • Mon, Jun 22 2015 6:40 In reply to

    • Ken Evans
    • Top 10 Contributor
      Male
    • Joined on Sun, Nov 18 2007
    • Stickford, UK
    • Posts 805

    Re: RE: The specified invariant name is not supported

    This error message also appears with MS Access - despite the fact that MS Access appears as one of the options in the DB Import dialog.

    Can anyone provide guidelines on how to write & add the code for MS Access import?

    Filed under:
Page 1 of 1 (10 items)
© 2008-2024 ------- Terms of Service