Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2008
    Posts
    5

    Unanswered: IBM DB2 9 SQL0206N EntityCommandExecutionException [colname] is not valid in the cont

    I am having trouble with IBM DB2 express c 10.1 and .net Entity Framework 4 to work. I am currently trying to get data from DB2 database using EF. This is the code:

    Code:
    using (DBEntities ent = new DBEntities())
     {
        foreach (Company comp in ent.COMPANIES)
        {
           listBox1.Items.Add(comp.Address);
        }
     }
    I encountered this exception: "EXTENT1.COMPANY_ID" is not valid in the context where it is used. I drop the table and created another one using a different schema owned by SYSIBM, [USERNAME].SYSIBM. The funny thing is i don't know how did i got that schema owned by SYSIBM in the first place. The problem is i can't create a schema with a SYSIBM authorization. Please help this poor soul.
    Last edited by the_transltr; 09-08-12 at 13:50.

  2. #2
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    That message typically means that the table "extent1" does not have a column called "company_id". Maybe you misspelled something?

    Regarding SYSIBM: I don't think you want to create objects created by SYSIBM ...
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

  3. #3
    Join Date
    Jun 2008
    Posts
    5
    The thing is there is no "extent1" table in my database. I created schema "DTIM" table "company" under that column "company_id". But still the issues persists.

  4. #4
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    I am currently trying to get data from DB2 database using EF.
    I don't know .net Entity Framework. So, this might be a silly question.
    How did you informed the table name and the column name to DB2 through EF?
    Isuued SELECT statement, or EF provides some interface?


    I created schema "DTIM" table "company" under that column "company_id".
    Plese publish your CREATE TABLE statement.

  5. #5
    Join Date
    Jun 2008
    Posts
    5
    Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •