Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6174037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:40:58+00:00 2026-05-23T23:40:58+00:00

I use to attach a database to my server explorer in visual studio 2010,

  • 0

I use to attach a database to my server explorer in visual studio 2010, instead of using a connection to sql server 2008 which i have installed on my pc.

Example:
My connection string used to be this:

<add name="YourGuruDB" 
     connectionString="Data Source=DIMA-00AA1DA557;Initial Catalog=model;Integrated Security=True"/>

And now it has changed to this:

<add name="YourGuruDB" 
     connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename='C:\Documents and Settings\Little Rabbit\Desktop\New Folder (2)\YourGuruDB1.mdf';Integrated Security=True;Connect Timeout=30;User Instance=True" 
     providerName="System.Data.SqlClient"/>

Is there a difference in the way I choose to connect a database (on performance or security or comfort, for example)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T23:41:00+00:00Added an answer on May 23, 2026 at 11:41 pm

    Your first connection string is using SQL Server (Express or other edition) as a server – the server is running the whole time, your clients are just connecting to it using a symbolic name (for the server and the database).

    In your second example, you’re limited to the SQL Server Express editions – this approach doesn’t work with any other edition. Also: you’re “spinning up and attaching” a SQL Server Express instance when you connect —> sounds like this might take up quite some time, at least during the first hit. And also: now your clients suddenly have to deal with presence of .MDF files and stuff like that…..

    Personally, I would always use the server-based approach – or if you really need a database on a local client machine, use SQL Server Compact Edition (using a single .sdf file) instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Sql Server 2008 Express database file that's currently being used by
How do I do this? Attach an SQL Server Express Database to a Visual
I detach a database file from a SQL Server 2000 and try to attach
I have a local SQL Server Express database that I want to copy to
I ran into a issue about Import/Export on SQL Server. I have a database
I'm trying to attach my database on a server that is running SQL2005 and
I have one database which contains the most recent data, and I want to
I was wondering what my options are for copying a SQL Server database. If
I have sql database stored on a shared netwrok drive , after set of
I recently moved a database from a 'SQL Server 2005 SP1' instance to 'SQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.