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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:09:58+00:00 2026-05-19T02:09:58+00:00

I am trying to connect to a database with my connection string and recieve

  • 0

I am trying to connect to a database with my connection string and recieve the following error when trying to connect to the database. For intergrated Security I user SSID so I don’t have to enter a username and password. Also, the database resides on the same machine and was created inside VS2010. I can connect to the db without a problem using the SqlDataSource, but I am looking to start writing my own connection strings.

    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        string source = "server=(local)" + "integrated security=SSPI;" + "Connect     Timeout=30; "  + "database=Name";
        SqlConnection conn = new SqlConnection(source);
        conn.Open();

        conn.Close();

    }

The Error I get is this:

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: Named Pipes
Provider, error: 40 – Could not open a
connection to SQL Server)

  • 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-19T02:09:59+00:00Added an answer on May 19, 2026 at 2:09 am

    Try the following syntax as connection string:

    string source = "Data Source=Server Address;Initial Catalog=Database Name;Integrated Security=SSPI;";
    

    Where Server Address should be localhost or .\SQLExpress

    Hope thats correct. I have’nt installed a vs for testing

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

Sidebar

Related Questions

While trying to connect to a database that's set to read only, the connection
I am trying to connect database.sdf on same director. Using following code but gives
I'm trying to connect to a remote database (hosted on Netfirms www.netfirms.ca if anyone
I am trying to connect to a remote MySQL database using Visual C# 2008
I'm trying to connect to an oracle database with SQL Developer. I've installed the
When trying to connect to an ORACLE user via TOAD (Quest Software) or any
I'm trying to connect to a SQL Server database using JDBC, the database I'm
I am using Oracle 9 JDBC Thin Driver - the connection string I have
In trying to write a simple C# ADO.NET application to connect to my database
I am trying to connect to an Oracle Database using nHibernate. I can connect

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.