none
Keyword not supported: 'metadata'. RRS feed

  • Question

  • Hi,

    I created my ADO.NET model based on an SQL Server DB (Created using Entity Framework).

    The connection string is (Created automatically with the ADO.NET model)

    <add name="ConnectivityAccessDBEntities" connectionString="metadata=res://*/ConnectivityAccessDBModel.csdl|res://*/ConnectivityAccessDBModel.ssdl|res://*/ConnectivityAccessDBModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=hvmwe;initial catalog=ConnectivityAccessDB;user id=*****;password=****;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

    But unfortunately, when running my application, I get the following error message:

    Keyword not supported: 'metadata'.

    I don't understand what is wrong with this connection string.
    I tried to replace the "&quot;" with "'" but that doesn't help

    Please I need help

    Regards,

    Nadeem Bader

    Saturday, March 7, 2015 10:44 PM

Answers

  • Hello Nadeem,

    With your provided connection string, I created a test demo, however, it could work fine with this connection string. So I think the string should be ok, for helping you looking into this case, please provide information as:

    Which version of Entity Framework are you using?

    Which API are you using, the DbContext or ObjectContext?

    Do you have even modified the generated code? If have, I suggest that you do not do that, just to do a simple test as below to check if this works:

    using (db_testEntities db=new db_testEntities())
    
                {
    
                    var result = db.Orders.ToList();   
    
                }
    

    And please share some related code with us which would help narrow down this issue.

    I am also wondering if it is an environment issue, please have a try to create a solution and create a new project with Entity Framework. Or using a new machine to create it to see if works.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, March 9, 2015 2:26 AM
    Moderator

All replies

  • I suggest that you delete everything about EF and go it again.
    Sunday, March 8, 2015 9:53 AM
  • Hi,

    I did that and created the model again, but doesn't help.

    Still need help

    Regards,

    Nadeem

    Sunday, March 8, 2015 11:58 AM
  • Hello Nadeem,

    With your provided connection string, I created a test demo, however, it could work fine with this connection string. So I think the string should be ok, for helping you looking into this case, please provide information as:

    Which version of Entity Framework are you using?

    Which API are you using, the DbContext or ObjectContext?

    Do you have even modified the generated code? If have, I suggest that you do not do that, just to do a simple test as below to check if this works:

    using (db_testEntities db=new db_testEntities())
    
                {
    
                    var result = db.Orders.ToList();   
    
                }
    

    And please share some related code with us which would help narrow down this issue.

    I am also wondering if it is an environment issue, please have a try to create a solution and create a new project with Entity Framework. Or using a new machine to create it to see if works.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, March 9, 2015 2:26 AM
    Moderator