Deploying a Visual C# application with SQL server express database - c#

I have a visual c# 2010 application that connects to the SQL server 2008 express.
How can I deploy my application including the database from sql server express without installing the SQl server 2008 express management studio?
Is it necessary to install sql server express in order to connect my application into the database?

Related

Visual Studio keeps asking to install SQL Server

I am using Visual Studio 2012 working on a web application, a registration page. I have installed SQL Server 2008 Express and done the configuration but still when when I try to add a SQL Server database file in the project, I get an error
Connection to SQL Server Database file (.mdf) requires SQL Server 2005 or SQL Server 2008 Express to be installed and running on you local computer
Please help I am stuck here.
You need to install the LocalDB or to change your connection string to use the SQL server you have installed, it seems like you are trying to use a MDF file.

Set SQL Server 2008 R2 as a prerequisites while making a C# set up file

I have developed a C# desktop application. I need to deploy it in a client's machine. This app needs SQL Server 2008 R2. It is not feasible to set up SQL Server first and then my app. So, I thought of giving dependencies. Unfortunately the prerequisites option in VS has no option to include SQL Server 2008 R2.
It has only option for SQL Server 2005 Express and SQL Server 2008 Express.
How do I include SQL Server 2008 R2?
Sql Server 2005 express and Sql Server 2008 express come with below Limitation :
uses only 1 CPU
can use max of 1 GB of RAM
is limited to 10 GB of database size
you can use these software for individual system (desktop).
But Sql Server 2008 R2 is dedicated database server ,you can install it same system or separate system.
you need to write custom code for pre-detection Sql Server 2008 R2 Instance.
Below link would be helpful :
https://msdn.microsoft.com/en-us/library/a6t1z9x2.aspx
http://www.codeproject.com/Articles/16231/Deploy-your-Application-and-Database

Error 948 :Visual Studio 2012 with SQL Server 2008 R2

I have a computer that working as server and client machine. I installed SQL Server 2008 R2 and Visual Studio 2012 in it.
Using SQL server management studio I generated a DB then I created few table in that DB , then I insert data into it.
Then I deattached that DB using Server Management studio . Then I move that DB into my project "App_Data" folder.Then using "server explorer" & T_SQL pane functions of Visual Studio 2012 I did few changes of that DB .
Since I want to do massive changes , I close that DB connection with the project. I move that DB into SQL server default Database Location which is
"C:\Program Files\Microsoft SQL
Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA"
then I try to attach that DB using server management studio , I'm getting
"Error 948"
Cannot be opened because it is version 706. This server supports
version 661 and earlier
How to overcome this error ? your ideas/suggestions highly appreciate
By default, you can't attach a DB file from a SQL Server 2012 to an instance which is running SQL Server 2008 R2.
Version 661 is a SQL Server 2008 R2 DB file and version 706 is a SQL Server 2012 DB file. More information: How to determine version of Local Sql Instance and your database
You will therefore need to update your SQL Server instance, e.g. by upgrading to SQL Server 2012
I would also recommend you patch to the newest released build of SQL Server 2012. Check here for the newest version numbers for the different SQL Server versions: Microsoft SQL Server Version List
its a version comparability issue.
Initially you created in sqlserver 2008 R2 that version would be 661 and when you moved to VS2012 it was updated to 706, and when you tried to go back to SQl server 2008 R2 again this 706 version is not being downgraded to 661, obviously it can't be done.
one simple solution without any changes to your server setup, use Generate Script feature that should help you.

Database connection fails

I have written c# application that uses mdf file for database.when i make setup of that project and runs on other computer having dotnetframework and sql server compact 3.5 then id dose not runs and exception is shown saying something sql server not found or not ready for connection something like that what should i do
mdf is not for sql server compact edition, it is for the real sql server. You need to deploy it to Sql Server Express edition or higher.
Edit:
You can install SQL server express edition or if you want to use the sql compact server you need to create a "local database" in visual studio.
When adding a mdf-database to your visual studio project is is attached to your local sql express database server behind the scenes when you start your project.

Configuring SQL server 2005 enterprise edition

What are the basic settings required for running SQL server 2005 enterprise edition in a local computer. When i take program from start menu it shows only sql server configuration manager, surface area manager, error reporting and a command prompt. There is no SQL server launching shortcut. How i get it?
you need sql server management Studio
http://www.microsoft.com/downloadS/details.aspx?familyid=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en

Categories