Reputation: 840
I have few doubts to clear from you all. I had enough to google now. I am very pure to C#
.
I have followed some tutorials
and then I did Windows Form App with using local database
.
It has used Visual Studio 2010
local database file is .sdf
format. Then I deploy the project as describe in the tutorial. And I run my application on my PC.
It has no severs installed. But application is working file. I can insert, update and delete data using my app.
After all those. I have developed same application in Visual Studio 2013
using .mdf
local database file. Deployed. But it's not working now.
I wanted to know.
Please, I hope you all have kind reply.
Upvotes: 1
Views: 3780
Reputation: 13960
I guess the second application is not working because it needs an instance of SQL Server up and running. SQL Compact edition (sdf) doesn't require a server to run, while SQL Server database (mdf) does.
About your other questions.
There is not a "best practice", you use one or another depending of your requirements.
You can use an SQL script to create your database during installation process.
Yes, you can run winforms in any machine with a .net runtime installed, it doesn't have to do at all with SQL Server.
Upvotes: 1