The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

Ignore schema and catalog problem

Last post 01-24-2008, 2:20 AM by Jobo. 9 replies.
Sort Posts: Previous Next
  •  04-04-2007, 3:29 PM 1609

    Ignore schema and catalog problem

    I am using  ES2007 v0.0328, Oracle 10g and C# on Visual Studio 2005. 

    I use MyGeneration v1.2.0.5 to generate the master classes with both Ignore schema and ignore catalog checked. I have a table called Customer.

    The following code compiles ok, but I get an exception when collection.LoadAll() is called.
     

                CustomerCollection collection = new CustomerCollection();

                collection.LoadAll();

    Error    1    TestCase 'Test_001_GetCustomerID'
    failed: System.Data.OracleClient.OracleException : ORA-01741: illegal zero-length identifier

       at EntitySpaces.Interfaces.esDataProvider.esLoadDataTable(esDataRequest request, esProviderSignature sig)
       at EntitySpaces.Interfaces.esDynamicQuery.Load()
       at EntitySpaces.Core.esEntityCollection.LoadAll()
      
     Could you tell what I am doing wrong?

     

  •  04-04-2007, 4:16 PM 1610 in reply to 1609

    Re: Ignore schema and catalog problem

    Why don't you uncheck them both and regenerate, do you have a valid config file setup as well. We test against Oracle and it works fine.
    EntitySpaces | Twitter | BLOG
  •  04-05-2007, 8:15 AM 1621 in reply to 1610

    Re: Ignore schema and catalog problem

    Yes, it works fine if I uncheck those two options. But I need to allow the users to create their own database accounts and I do not want to restriant the username they use. In this case, I do not want the schema and catalog be hard coded in the Metadata classes. Is there any way I can do this?
  •  07-20-2007, 5:01 AM 3973 in reply to 1621

    Re: Ignore schema and catalog problem

    Hello, I've got exactly the same problem. (using Oracle 10g, EntitySpaces 2007.0.0709 and C#)

    I start using MyGeneration with Ignore Schema/Catalog checkboxes uncheck but when trying to use my application with another user (Catalog/Schema name changed), it tells Table or View does not exist.

    Then I use MyGeneration with Ignore Schema/Catalog checkboxes checked but Exception raised is now ORA-01741: illegal zero-length identifier.

    It seeems that when Catalog/Schema is empty the generated SQL command is Select * From ""."Table_Name" instead of Select * from "Table_Name"

    I can't find a workaround (once you generated you classes your stuck with this schema name), could you please help me ?

    Best regards

    Djemel

     

  •  07-20-2007, 6:09 AM 3974 in reply to 3973

    Re: Ignore schema and catalog problem

    Here's what we suggest until we look into this. Generated them with Catalog/Schema on, then do a global find replace to adjust them to the other database. I know this isn't a good solution but you might try every combination of them, one off and on on, then the other way. We are currently rewriting all of the providers and they will go through exhaustive testing for just these kinds of things. We will enter this into our tracking system and make sure it is fixed in our mid-August release.
    EntitySpaces | Twitter | BLOG
  •  09-24-2007, 8:43 AM 5271 in reply to 3974

    Re: Ignore schema and catalog problem

    Hello Mike,

    I've download the latest Release 2007.0.913.0 but unfortunatelly the problem with "" empty Catalog/Schema is still here with Oracle 10g.
    Do you think it will be fixe in the nex Release ?

    Thank you

    Djemel

     


     

     

     

  •  10-10-2007, 2:58 AM 5744 in reply to 5271

    Re: Ignore schema and catalog problem

    Hello EntitySpaces team and users

    Could you please help me on that point ?

    Thank you


     

  •  01-23-2008, 1:31 AM 7754 in reply to 5744

    Re: Ignore schema and catalog problem

    Hello,

     im trying to support Oracle now, too. And that problem still exists, or am i missing something? Im thinking about replacing the catalog and schema code with a static call but if theres another solution it could save a lot of time now and even more in the future.

    Setting schema and catalog in the "private esProviderSpecificMetadata ORACLE(string mapName)" function would also mean users have to restart the Application when changing the connection.

    Thanks for any information on this,

    Joris Bauer
     

  •  01-23-2008, 4:51 AM 7756 in reply to 7754

    Re: Ignore schema and catalog problem

    Is there anyway you can provide these in the connection string as we do for SQL Server? In SQL Server we check these two and set the "Initial Catalog" on the connection string and based on the user id we sign on with the user must have access to that catalog/schema. We will fix this in ES2008 but can somebody check to see if Oracle supports such a thing in the connection string (we will do some research too).

    EntitySpaces | Twitter | BLOG
  •  01-24-2008, 2:20 AM 7793 in reply to 7756

    Re: Ignore schema and catalog problem

    Im not experienced with Oracle at all, but here´s what i think. My ConnectionString for ES looks like that now:

     Password=test;Persist Security Info=True;User ID=Job;Data Source=localhost:1521;

    If i generate the Metadata without ignoring schema and catalog i get "Job" as values for schema and catalog. But, and here comes my lack of experience, that may be different when using a different Oracle 10g Server version. Im using the Express Edition for testing. As far as i know i cannot configure the Express Edition like SQL-Server (Server-Database-Schema) as theres only Server-User(and User is schema and catalog then) in the Express Edition. I will test everything on our "normal" Oracle Server when i got everything correctly migrated, sprocs generated etc. on my Express Edition. That will take some time however, but i should be able to tell you more when im done.

     Greetings,

    Joris
     

View as RSS news feed in XML