locked
Connection string with .mdf file RRS feed

  • Question

  • User-1727936553 posted

    Hi Everyone

    I'm making a new website with ASP.NET (visual studio 2012).
    First I need a connection string in my config file, like this:

    <connectionStrings>
      <add name="BookstoreConnectionString"
        connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Bookstore.mdf;Integrated Security=True;User Instance=True"
        providerName="System.Data.SqlClient" />
    </connectionStrings>

    My database is in my App_data folder of the project.

    Foutmelding

    It would be nice if someone could help me!

    Monday, August 12, 2013 6:07 PM

Answers

  • User-933407369 posted

    hi  stijnos7,

    From what I understand you want to  using  Connection string with .mdf file in your website.you can try checking SQLEXPRESS  Service  is  whether turned on ,make sure there is no problem installing SQLEXPRESS and make sure  your  database is in your App_data folder of the project  that your  database does not contain illegal characters  (e.g  “/”, “.”). 

    As you upload picture  blurrier not understand your specific question,please post error message in order to help us to understand your issue better.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 13, 2013 5:09 AM

All replies

  • User-1727936553 posted

    Solved, new problem:

    Monday, August 12, 2013 6:15 PM
  • User-933407369 posted

    hi  stijnos7,

    From what I understand you want to  using  Connection string with .mdf file in your website.you can try checking SQLEXPRESS  Service  is  whether turned on ,make sure there is no problem installing SQLEXPRESS and make sure  your  database is in your App_data folder of the project  that your  database does not contain illegal characters  (e.g  “/”, “.”). 

    As you upload picture  blurrier not understand your specific question,please post error message in order to help us to understand your issue better.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 13, 2013 5:09 AM