Do I need to install SQL Express if SQL Server is already installed?

I have a server that has SQL Server 2008 R2 installed but my application uses SQL Express 2008 R2 - do I need to install SQL Express as well? The error Im currently getting is:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Answers


You can create your database the SQL Server and connect with the correct connection string. You can not attach your Database files like in SQL Server express though.

There is no need to install SQL Server Express.

A common connection string to connect to SQL Server is:

Data Source=yourServer;Initial Catalog=yourDatabase;Integrated Security=SSPI;

Replace yourServer with the servername (in the form of Server\instance) and yourDatabase with the name of the database you wish to connect to.

The following connection string for SQL Server Express does not work on a standard SQL Server:

Server=yourServer;AttachDbFilename=c:\data\yourDatabase.mdf;Database=yourDatabase; Trusted_Connection=Yes;

Need Your Help

List of all street and road names in Google in API

android google-maps-api-3 gps

Am doing a location based app.When using GPS, it provides with street names from Google API. When user need to enter it manually, for a autocomplete text view am in need of names of all street and ...