4 Replies Latest reply on Nov 28, 2012 6:20 PM by 976700

    Entity Framework doesn't see the tables

      Hi, i have created "simple" db at university's server, and tryied to use EF with newest odp.net
      but, i can't see any tables (and other objects) from database in EF wizard and after it in edmx
      so, what i want to say, is that the data provider itself can see the tables (and if i want to create dataset, it see it too)
      but EF wizard can not, and i don't know why :)

      P.s. sorry for my english :D

      Edited by: 973697 on 2012-11-28 04:02
        • 1. Re: Entity Framework doesn't see the tables
          Hi. Your English is fine. :)

          The tricky part to this is that any tables that your user owns will show up automatically. Other ones will not. You can fix that by following these steps:

          1. Open Server Explorer in Visual Studio.
          2. Create a connection to the database you want to use in EF, as the user you want. (You may already have this.)
          3. Right click on that connection and click 'Modify Connection'.
          4. Click the 'Filters' tab.
          5. Click on 'Displayed Schemas' in the grid of options and then click on the "..." just above the grid. It's on the right hand side. (If you're not sure which one that is, just select all of them. That'll slow it down when you're using it, but it works.)
          6. You need to find the schema that your tables are in and move them to the 'displayed schemas' side. After you do that, click Ok.
          7. Click 'Update" at the bottom of the grid.
          8. Click 'Ok' to close that window.
          9. Now if you close/reopen the connection, you'll see the objects in those schemas also appear. This will also make them show up in the EF wizard (it uses the same connection).

          Let us know how it goes. :)

          Edited by: Tridus on Nov 28, 2012 9:50 AM
          • 2. Re: Entity Framework doesn't see the tables
            So, i think i has the right schema, but maybe i'm wrong, and i think i'm not able to say better what's my problem, and pictures are worth more than 1000 words, so:

            DataSet & EF: http://s16.postimage.org/bjy9g9w2b/orcl1.png
            Schema: http://s11.postimage.org/r5qxi7y0x/orcl_Schema.png

            P.s. I've tried to change schema, actually i've added all aviable schemas from db, to displayed schemas, and then some tables was shown, but any was mine :P

            Edited by: 973697 on 2012-11-28 08:33
            • 3. Re: Entity Framework doesn't see the tables
              Hmm. What kind of account are you using? I do know there's an issue with getting tables to show up if you're using OS authentication (that is, you don't have to type a password).

              If you're using the same user account in both options there it shouldn't be permissions, so beyond that I'm not really sure what's up.
              • 4. Re: Entity Framework doesn't see the tables
                No this, is university server, so im not using windows authentication account, and i haven't got admin account (btw), but i should have all CRUD permisions (and i'm pretty sure that i've got) on my account, to control my database.