Creating SQL Server database from vb.net, without SQL Server

时间秒杀一切 提交于 2019-12-12 19:16:23

问题


I'm programming an installer for an application in VB.net. My application needs a SQL Server database to work, but I want that my app runs in machines without SQL Server instances installed.

Exists sqlcmd standalone or something? (I would like to include it in my installation pack)

Is possible create a database via sqlcmd this way?

Thank you


回答1:


If you want to use the full power of the SQL Server Database you need to install an instance of SQL Server. If the problem is the cost for the final user, and they meet the criteria, they can install SQL Server Express, that is free.

But, if your application:

  • Only uses the database to persist information locally and you don’t need to share this information with other instances of the application running on other PCs.
  • Uses .NET 4.02 or newer.

You can use SQL Server Express LocalDB, available on SQL Server 2012 or later.

LocalDB lets you use MDF files and work like you were using a full SQL Server database, with some limitations, without the need of installing and configuring a full SQL Server instance.

Your installation program can launch the installation of SQL Server Express LocalDB (SqlLocalDB.msi), so the user don’t have to install the product separately.



来源:https://stackoverflow.com/questions/36617176/creating-sql-server-database-from-vb-net-without-sql-server

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