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

  • SEARCH
  • Home
  • 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 3760102
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:25:11+00:00 2026-05-19T10:25:11+00:00

There’s no particular problem, I just wanted to ask whther I’m doing it right

  • 0

There’s no particular problem, I just wanted to ask whther I’m doing it right or wrong.

I have connection string stored in Settings.Default.ServerConnection property on which rely all DB-related objects. I also use auto-generated TableAdapters for server-side stored procedures (SQL Server 2008 R2 Express) with Connection property set to use mentioned connection property. There is a settings form where I can setup a connection to any server on the local network (using SqlClientFactory.Instance.CreateDataSourceEnumerator().GetDataSources()) and store it in app’s settings.

So I was wondering if it’s the right approach of doing such thing or not because when app is executed for the first time it’s still able to connect to SQL server without even configuring the connection (Data Source set to (local) by default).

  • 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-19T10:25:11+00:00Added an answer on May 19, 2026 at 10:25 am

    If I’m understanding the question… 🙂

    Your app is able to connect to local because that is the how its bound in its current environment (say it was a remote IP, it wouldn’t work).

    Storing connection string information in the config file (e.g. app.config) is a great idea, because it can be changed on the fly without a rebuild.

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
There are many string matching algorithms can be used to find a pattern (string)
There is this strange situation I'm fighting on. I have 3 pages, les call
There is a website with an AJAX API. I have opened Firebug to look
There are many questions about this PersistenceException, but I have not seen some, where
There was some progress made to the earlier problem. Now there is a new
There are probably many other questions I don't even know to ask yet since
There are currently many projects within Jira. Some developers might have tasks or issues
There seem to be very different opinions about using transactions for reading from a
There seems to be a similar question to this on here but with the

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.