Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I use c# windows form.

I create server mdf file in D:\try.mdf and i want to reach another computer to this file and i want to use this mdf file. How can i write connection string and what can i do to solve this problem.

help please
Posted

Not sure what an MDF file is, but you can generally find the answer to this question at ConnectionStrings.com - Forgot that connection string? Get it here![^].
 
Share this answer
 
Comments
alienqueen 9-Jan-16 9:15am    
not enough info
Richard MacCutchan 9-Jan-16 11:10am    
The same applies to your question.
You can't. An .MDF file can only be attached by a single instance of SQL Server Express at a time, or whichever local server you're using.

If you need to "share" that file among multiple instances of your application you need a single SQL Server to host the database. All of your application instances will talk with that single instance of SQL Server. SQL Server Express can be used, but you have to configure it to accept remote connections[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900