Click here to Skip to main content
13,146,934 members (78,852 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Suppose I have a database on localhost. I want to connect a C# application with it.
I want to just put database file local to that application and it pick it up from there each time. I don't need to give database path.
Application: myapplication.exe
Database: file.mdf and file_log.ldf. etc

Please a connection string solution.
Posted 9-Jan-13 9:40am
Where is your question?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

No It wont work. .mdf and .ldf are SQL Server files you cannot interact directly with these files without SQL Server Engine.

Also check this[^]

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170915.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100