Click here to Skip to main content
11,638,173 members (76,267 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# .NET
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.
Thanks
Posted 9-Jan-13 9:40am
Comments
Sergey Alexandrovich Kryukov at 9-Jan-13 16:50pm
   
Where is your question?
—SA

1 solution

Rate this: bad
good
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[^]
  Permalink  

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

  Print Answers RSS
0 jyo.net 348
1 stibee 318
2 Sergey Alexandrovich Kryukov 314
3 OriginalGriff 190
4 Mika Wendelius 185
0 OriginalGriff 9,051
1 Sergey Alexandrovich Kryukov 8,773
2 Mika Wendelius 7,034
3 Suvendu Shekhar Giri 2,425
4 F-ES Sitecore 2,408


Advertise | Privacy | Mobile
Web01 | 2.8.150728.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2015
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