VB.NET Application Deployment with SQL database - vb.net

I have developed a VB.NET application with SQL database, now i want to package it with the database and deploy it on some other machine which does not have SQL installed.

You could use InstallShield - that will allow you to create an installer which includes your program and allows you to install your SQL Server 2008 instance.

Related

Click once deployment with local sql database

I have a client application that will be deployed using ClickOnce. The client application will connect to a local sql database on their machine. They will need sql server 2008 express installed upon installed and the .mdf file attached.
I set Prerequisites to include sql server 2012 express.
So I would like the application when installing to check if sql server already installed with the database. If not then install and attach database. How can i achieve this properly using click once. I have a vb.net project using visual studio 2013. any references would help thanks.
You just have to change your connection string
to somthing like this
Server=.\SQLExpress;AttachDbFilename=C:\MyFolder\MyDataFile.mdf;Database=dbname;
Trusted_Connection=Yes
now your sql is linked to a specific database file
check this link https://www.connectionstrings.com/sqlconnection/attach-a-database-file-on-connect-to-a-local-sql-server-express-instance/

Is this important to install sql server with an windows application set up

I have developed a application in c# which is windows based application. It stores data into database sql server. I want to know, when I create setup in VS and install it in a client computer should I install sql server software also or Is there any way without installing SQL Server in client's PC My application can function correctly.
sIf you use a filebased implementaion of SQL (localDB) you should be able to get away with a "setup" installing the neccecary dependencies to bootstrap the DB. (Someone correct me?)
If you use the DB in a hosted SQL environment (SQL Server running as a service), you will need to install SQL server on the deployed pc, and get the database up.
I am no sure if you can "automate" installing SQL server and getting the DB up from a setup app.
You have two deployment options for applications that contain SQL Server Compact 3.5 databases. The method of deployment you choose depends on the servicing requirements of your application and whether your users will need administrative credentials on the computer on which the application will be installed.
Following are the deployment options for SQL Server Compact 3.5 databases:
1. Traditional Microsoft Windows Installer (Microsoft setup technology)
a. Users need administrative credentials to install the application.
b. SQL Server Compact 3.5 will be serviced by Microsoft Update.
c. Can use ClickOnce deployment.
-or-
Private file–based deployment (deploying the SQL Server Compact 3.5 DLLs as part of the project)
1. Users do not need administrative credentials to install the application.
2. SQL Server Compact 3.5 will not be serviced by Microsoft Update.
3. Can also use ClickOnce deployment.

Deploying a VB.net 2010 Win Forms application

I am deploying a VB.net 2010 winforms application, and when I install it on the client's machine, the install process also installs an instance of SQL Server 2005 Express. The application connects to a central SQL database on the server. To install, I am using the "Publish" option in VS 2010
Why does it do that? There should be no need for a local instance of SQL Express. Is there a way to avoid installing SQL 2005 Express (I know it is free, but I would rather not have it installed if possible)
It's likely that whatever technology you're using for packaging/deployment is including the installer for SQL. For the default setup project, I believe it is a checkbox for a pre-requisite.

sql server 2008 application with wpf

I made an application using blend3 and SQL 2008 how can I make this application work on another PC with its database without install visual studio 2008 and how to install SQL 2008 in this case ? should I create new database or what ?
I tried to install SQL2008 as default instance by choose 4 first check in installed feature then open reporting SQL and create new database for the same name you want to connect and then close all sql server from task manager then copy your database with the same name in the data folder in Microsoft SQL then start you application it will work .

Do I have both SQL Server 2005 and SQL Server 2008 installed?

When in 'SQL Server Configuration Manager' I see, under 'SQL Server Services', 2 items that look like SQL Server's:
SQL Server (sqlexpress)
SQL Server (mssqlserver)
Does that mean I have 2 versions installed at the same time? The 'SQL Server (mssqlserver) is currently stopped).
You have two instances. They might or might not be the same version (meaning 2005/2008).
Express is just an SKU / edition from the myriad of different editions.
You can have the same version or multiple versions/SKUs installed as different instances on the same machine.
So unless someone wittingly set up a new instance with the name "sqlexpress", you probably have two kinds of products installed (both can be 2008 or both can be 2005 or they can be different - it is just that one of them is presumably the Express SKU while the other is say Standard.)
You can get more information on the instances by using ##VERSION.
It looks like you got SQL Server Express installed with Visual Studio and then later installed SQL Server 2008. I've done this before and the best solution I found was to completely uninstall SQL Server Express and SQL Server 2008. Remove all the files in the Microsoft SQL Server directory in Program Files, then reinstall SQL Server 2008. If you still have problems getting the 2008 instance to be the default, you may also need to uninstall Visual Studio.
In the future, if you're going to install the development (or other) version of SQL Server locally, I suggest making sure you install it before Visual Studio. The VS install won't install SQL Server Express if it detects an existing SQL Server instance on the system.
BTW, you can verify if this is true by using the Add/Remove Programs Control Panel item.
SQLExpress is the light/free edition, usually used for developers or very lightweight applications.
MSSQLServer is the full blown SQL install.
So yes you have 2 "SQL Server" installs, but they are different products, I can't say which versions based on your provided data.
You have two SqlServer instances installed on your system. One is SqlServer Express Edition and the other one a Sql Server. I can't say which version or edition.
Maybe you can find some more information in the registry (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft).
I'd vote against removing either one--SQL server does fine with multiple instances and they are good for different things. For example, lots of open source projects presume a local copy of sql express at .\SQLEXPRESS for development use. Whereas you can't write analysis service stuff with SQL Express.
Or, its not a problem. Those aren't the droids your looking for. Move along.