none
dbContext and SQL 2008 or SQL Express

    Question

  • Hello,

    I'm new to ASP MVC 4 and Entity framework, and I was walking through a tutorial on the ASP.NET site (to be specific MvcMovie app), and I was able to use dbContext and code first to create a schema in SQL CE 4 with just a connection string, and when I change the connection string to point to my local sql 2008 server, it does not work. Is there something I need to do in addition to just changing the connection string to make it work with sql express and sql 2008?

    Thanks

    Tuesday, April 17, 2012 3:53 PM

Answers

  • Hi,

    "It does not work" is not enough. It could be easier if you tell us exactly what happens. It could be a wrong connection string or a SQL Server 2008 misconfiguration (we are not sure it works if you try to connect directly to the server) or a zillion of other things we could hardly imagine.

    Plase never post about an error without telling what the actual error. SQL Express should be the easiest. When you don't have a connection string, EF uses a local SQL Server Express connection.


    Please always mark whatever response solved your issue so that the thread is properly marked as "Answered".



    Hi Patrice,

    Sorry about that, I should have known better. The problem ended up being an improper formatted connections string. I didn't have the Integrated Security set so that I can connect locally.

    • Marked as answer by joey_sal Tuesday, April 17, 2012 4:44 PM
    Tuesday, April 17, 2012 4:44 PM

All replies

  • Hi,

    "It does not work" is not enough. It could be easier if you tell us exactly what happens. It could be a wrong connection string or a SQL Server 2008 misconfiguration (we are not sure it works if you try to connect directly to the server) or a zillion of other things we could hardly imagine.

    Plase never post about an error without telling what the actual error. SQL Express should be the easiest. When you don't have a connection string, EF uses a local SQL Server Express connection.


    Please always mark whatever response solved your issue so that the thread is properly marked as "Answered".



    Tuesday, April 17, 2012 4:13 PM
  • Hi,

    "It does not work" is not enough. It could be easier if you tell us exactly what happens. It could be a wrong connection string or a SQL Server 2008 misconfiguration (we are not sure it works if you try to connect directly to the server) or a zillion of other things we could hardly imagine.

    Plase never post about an error without telling what the actual error. SQL Express should be the easiest. When you don't have a connection string, EF uses a local SQL Server Express connection.


    Please always mark whatever response solved your issue so that the thread is properly marked as "Answered".



    Hi Patrice,

    Sorry about that, I should have known better. The problem ended up being an improper formatted connections string. I didn't have the Integrated Security set so that I can connect locally.

    • Marked as answer by joey_sal Tuesday, April 17, 2012 4:44 PM
    Tuesday, April 17, 2012 4:44 PM