How to include database file and SQL Server Express installer for Deployment with VS2010 - setup-project

I am using Visual Studio 2010 and SQL Server 2008 Express
I would like to deploy my project with setup and deployment project and would like to include the SQL Server database file and SQL Server 2008 Express installer, so the user can easily install and use the application.
Please anyone show me step by step instructions.
Or any link that can help me to solve this out
Thanks

Use prerequisites check box, this will install sql server on client machine

Related

Why is no database shown in Visual Studio?

My SQL Server Object Explorer is not showing any databases:
I also get an error A network-related or instance-specific error occurred while establishing a connection to SQL Server. .... When I run the website, the error being shown is The system cannot find the file specified. Furthermore, SQL Server is missing from Services:
(It was installed together with Visual Studio and was never used separately)
Yesterday, everything worked like charm; I had multiple databases with tables and was able to access the data. Today, the same project can't even start, no db's either. What's wrong with Visual Studio here? Thanks
I've had the same problem before. Took me a while to figure it out. What you need to do is go here: https://www.microsoft.com/en-us/download/details.aspx?id=42299
In my case, i'm using SQL Server 2014 Management Studio. You must find the one that suits the version of SQL studio that you're using (2008, 2012, 2014).
Click the big download button and now, it is very important that you choose the proper version. Check:
Express 32BIT\SQLEXPR_x86_ENU.exe if you're running on a 32-bit PC, or
Express 64BIT\SQLEXPR_x64_ENU.exe if you're running on a 64-bit PC
It is very important that you install Express version.
Next, once you install that, you should be able to see the SQL Server (MSSQLSERVER) in your services.msc, along with few other SQL services installed.
Open Visual Studio 2015 and in SQL Server Object Explorer window right click on SQL Server and choose Add SQL Server... option. It should prompt you to connet to the server from SQL Server Management Studio.
If you kept everything by default during the installation, just type . (dot) for the Server name and click connect. Now it should load the database.
It turns out that Visual Studio does not come with MS SQL Server in the default installation. It is necessary to install SQL Server Data Tools from the MS website manually. VS custom installation also allows to do that, but you will need an installer. Just make sure to select SSDT in the custom installation components menu. Additionally, I also ran an update from VS itself that allowed me to install SQL Server 2008, 14, and 16. I am finally able to access DB in VS!

How to install sql server 2008 r2 express silently using installshield

I have created a C# Windows application and used SQL Server 2008 R2 for database. So I need to install SQL Server on my client's machine to run my application.
For this I have created a setup using Installshield and added prerequisites SQL Server.
But the problem is: I need to install it silently so user doesn't have to configure it. I have tried a command line code but it not working, it's showing installing SQL Server, but it does not really get installed.
Code I have tried :-
SQLEXPRWT_x86_ENU.exe /q /Action=Install /Hideconsole
/Features=SQL,Tools /InstanceName=SQLExpress
/SQLSYSADMINACCOUNTS="Builtin\Administrators"
/SQLSVCACCOUNT="NT AUTHORITY\Network Service" /SQLSVCPASSWORD="a123"
I think you missing IACCEPTSQLSERVERLICENSETERMS parameter, it is required for silent install , it should be TRUE.
Check following Links.
How to install SQL Server 2008 R2 Express silently using command prompt
SQL Server 2008 R2 – Unattended Silent Install

Unable to load native components of Sql Server Compact when I try to run my application

I have created a setup for c# app. but after installation it shows me following error:
Unable to load native components of SQL Server compact corresponding to the ADO.NET
provider of the version 8080.
Install the correct version of SQL server compact.
Do I need to include SQL Server Compact in my application setup?
Build 8080 is version 3.5. not 4.0. You are referencing the wrong version.
please install sql server compact edition.
download from : http://www.microsoft.com/en-us/download/details.aspx?id=17876
then restart your application, then it should be work.

how to create database in visual studio 2010 when sql server installed?

I want to create a database(.mdf) within my website. When i try to add sql server database by:
right clicking the project->add new item->Sql Server Database. I get the following error:
I have sql server 2008 installed on my machine and i have been using it to connect to different databases of sql server by going in the "Server Explorer" section of Visual Studio, as shown below:
But when i try to create a database with my website, i am having problems. I am using Visual Studio 2010.
Please help?

Installing SQL server 2005 if SQL Server 2008 is installed

My application runs on SQL Server 2005. I have added bootstraper to install SQL Server Express 2005. It ensures to install SQL Server Express 2005 at installation time.
My question is if my user has already got SQL Server 2008? Will the bootstraper still work the same way? Will it be able to install SQL Server 2005 as 2008 is advance?
The predefined SQL Server 2005 prerequisite in Visual Studio uses a custom EXE to determine if it needs to be installed or not. So you cannot see the detection criteria.
You can try testing the scenario you mentioned on a clean machine and see what happens. This is the only way you can determine if it will be installed or not.

Resources