1

I am currently working in c# application forms. I have created a .mdf database called Student_CB.mdf. Its located with in the solution for the project.

What i am trying to do is create a connection string to it. The string needs to stay localised to the solution as i will be opening the project on other PC's and not just my own PC.

The connection string in the properties states its the following string:

Data Source=(LocalDB)\v11.0;AttachDbFilename="C:\Users\Donald\Documents\Visual Studio 2013\Projects\DesktopApplication\DesktopApplication\Student_CB.mdf";Integrated Security=True 

I have tried putting this into an SqlConnection in my c# but its not liking it.

Any help or ideas with where i am going wrong?

  • 2
    You've got all the info [here](http://www.connectionstrings.com/access/) – Pikoh Mar 22 '16 at 14:47
  • Could you expand on "c# is not liking it"? Do you get an error? If so, what's the error? What does your code look like? How are you setting up the connection? There are a few unknowns that can affect this, so more information would be helpful. – ragerory Mar 22 '16 at 14:48

0 Answers0