How to run desktop application with database locally without installing any database Server?

試著忘記壹切 提交于 2019-12-09 17:21:13

问题


I wanted to create a desktop application with database, am using Visual Studio 2013 and C# , Can anybody suggest me what server I used to create my database, in order to run my application in my client's system locally with out installing any database server in client's system [ie, with out installing MsSql server or MySql server or Acess], I want my app works properly when installing my own application's exe file ?

And Now am using MSSQL server with my application , Is there any way run this application in client's system locally with out installing MSSQL Server? [my application front end works when I install .Net FrameWork 4.5 , I need something like this for my .mdf databse in Sql Server]

somebody says about SQL Server Compact ,but i don't know how to use it


回答1:


You can use SQL Server Compact, which can either be installed separately or deployed as part of your application.

See here: How to deploy SQL Server Compact Edition 4.0?

And here: https://msdn.microsoft.com/en-gb/library/aa983326(v=vs.110).aspx

Your DB code in your app - apart from your connection string - should not need to change as you're already using some version of SQL Server.

There is also SQLite, which is as far as I know is well regarded, but I know very little about it. http://www.sqlite.org/

Hope that helps!




回答2:


It is not unusual for an application to require an existing functional database server. Of course this is appropriate only if your target audience is technical enough to install the prerequisite on their own, or if the target environment is guaranteed to already meet your prerequisite.

If not, you need to fall back to an embedded database.



来源:https://stackoverflow.com/questions/31914283/how-to-run-desktop-application-with-database-locally-without-installing-any-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!