0

I use mdf database file. In server side I keep mdf file in D drive. Now I share this mdf file via lan to client system. If Client add any data means, it want to save in this shared .mdf file. For this how can I Proceed this and what is the connection string for this. Please reply me as soon as possible.

Thank You

  • 1
    Duplicate: http://stackoverflow.com/questions/8914620/sharing-mdf-file-on-a-network Related: http://stackoverflow.com/questions/10366586/is-it-possible-to-run-a-mdf-database-without-sql-server-program-c – Tim Schmelter Jan 20 '16 at 12:34

1 Answers1

0

By adding "|DataDirectory|" to your DataSource, you can make the path relative to the execution directory, so the user doesn't have to put a new path inside the DataSource. As far as I know you can't access the data from your customer. You would have to synchronize your DB with your customers.

Saving your data programmatically isn't that hard. Just use "SqlConnection", "SqlCommand"'s etc.

SqlConnection

kaliba
  • 230
  • 2
  • 12