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 9203855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:33:57+00:00 2026-06-17T23:33:57+00:00

i have just known the diffrence between the service based database and local db

  • 0

i have just known the diffrence between the service based database and local db so as per my need i have transfered the project database to local db and i have questioned and found that i just have to replace the connection string which is the main thing in that and nothing i have to add and replace in my code so. now i am getting the error which i dont know how to solve
my code for local database is

       SqlConnection con = new SqlConnection();
              SqlConnection conn = new SqlConnection();
              conn.ConnectionString = @"Data Source=E
    :\project\+project\WindowsFormsApplication1\Database1.sdf";
              SqlCommand cmd = new SqlCommand();
              cmd.Connection = conn;
              conn.Open();
              try
         {
             // something
          }

              catch (Exception)
          {
              MessageBox.Show("ERROR");

          }
              conn.Close();
          }

and error i am getting on the conn.open

 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)
  • 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-06-17T23:33:59+00:00Added an answer on June 17, 2026 at 11:33 pm

    You must use SqlCeConnection and SqlCeCommand instead of SqlConnection and SqlCommand.

    Eample: http://www.dotnetperls.com/sqlce

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

Sidebar

Related Questions

I have solved this problem, I just need to know what to do. I
I have just recently discovered the difference between different constructors in GDI+. Going: var
I have known for a while that the primary difference between lists and tuples
I know this sounds confusing: I have just built some basic prev/next pagination for
I don't mean form athentication. You know how some webpage just have a popup
I just want to know how to access an array in SMARTY that have
I just want to know that can i make an application which have some
I have a problem and I just do not know how to solve it.
Maybe I just don't know enough about structs and have been using them blindly
I have this class file call SMSHelper.cs First I just wanted to know is

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.